pawarprasad123 commented on code in PR #721:
URL: https://github.com/apache/atlas/pull/721#discussion_r3859994090


##########
docs/crypto-fallback.js:
##########
@@ -0,0 +1,30 @@
+/**

Review Comment:
   Global crypto.createHash patch and swallowing ECONNRESET are risky. 
   
   verify this and provide the comment



##########
webapp/pom.xml:
##########
@@ -683,6 +683,38 @@
                             </tasks>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>fix-enunciate-css</id>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <tasks>
+                                <!-- Copy CSS -->
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/css/bootstrap.min.css" 
todir="${project.build.directory}/api/v2/css" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/css/bootstrap.min.css" 
todir="${project.build.directory}/api/v2/apidocs/css" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/css/bootstrap.min.css" 
todir="${project.build.directory}/api/v2/apidocs/ui/css" />
+
+                                <!-- Copy JS -->
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/jquery-1.12.2.min.js" 
todir="${project.build.directory}/api/v2/js" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/bootstrap.min.js" 
todir="${project.build.directory}/api/v2/js" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/run_prettify.js" 
todir="${project.build.directory}/api/v2/js" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/jquery-1.12.2.min.js" 
todir="${project.build.directory}/api/v2/apidocs/js" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/bootstrap.min.js" 
todir="${project.build.directory}/api/v2/apidocs/js" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/run_prettify.js" 
todir="${project.build.directory}/api/v2/apidocs/js" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/jquery-1.12.2.min.js" 
todir="${project.build.directory}/api/v2/apidocs/ui/js" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/bootstrap.min.js" 
todir="${project.build.directory}/api/v2/apidocs/ui/js" />
+                                <copy failonerror="false" 
file="${project.basedir}/src/main/enunciate-assets/js/run_prettify.js" 
todir="${project.build.directory}/api/v2/apidocs/ui/js" />
+
+                                <!-- Replace URLs -->
+                                <replace 
dir="${project.build.directory}/api/v2" includes="**/*.html" 
token="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css";
 value="css/bootstrap.min.css" />
+                                <replace 
dir="${project.build.directory}/api/v2" includes="**/*.html" 
token="https://code.jquery.com/jquery-1.12.2.min.js"; 
value="js/jquery-1.12.2.min.js" />

Review Comment:
    jQuery CDN not replaced
   Enunciate generates jquery-3.5.1, but the Ant replace targets jquery-1.12.2:
   
   So 118 pages (e.g. resource_*.html, json_*.html, data.html) still violate 
CSP for jQuery and IE shiv/respond scripts.Bundled asset is jQuery 1.12.2, 
while generated HTML expects 3.5.1 — version mismatch even if the replace token 
were corrected.
   
   Other webapp concerns
   failonerror="false" on all 12 copy tasks — missing assets fail silently; 
styling breaks with no build error.
   Repetitive Ant copies — 12 nearly identical <copy> calls; could use Ant 
<copy todir> with a fileset or Maven resources plugin.
   No automated verification that CDN URLs are gone after build.
   Vendored libraries are outdated — Bootstrap 3.4.1, jQuery 1.12.2 (acceptable 
for Enunciate compatibility, but jQuery 3.5.1 is what Enunciate actually emits).
   
   ----
   
   verify all this and provide the fix and if not needed fix provide the 
comment and also update the pr description properly for the same.



##########
docs/src/documents/RestAPI.md:
##########
@@ -10,4 +10,3 @@ import {CustomLink} from 
"theme/components/shared/common/CustomLink";
 # REST API
 
 1. <CustomLink href="http://atlas.apache.org/api/v2/index.html";>REST API 
Documentation</CustomLink>
-2. <CustomLink href="http://atlas.apache.org/api/rest.html";>Legacy API 
Documentation </CustomLink>

Review Comment:
   Why remove Legacy API Documentation link? Unrelated to CSP fix.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to