-
Notifications
You must be signed in to change notification settings - Fork 145
Security: Exposed Source Map Review #596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security: Exposed Source Map Review #596
Conversation
theiris6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review document is generally well-structured and correctly addresses the source map exposure finding with appropriate evidence. The response acknowledges the finding while providing context about development vs. production environments.
|
Hello @lachlan-robinson, Your documentation directly identifies the source of the false positive and shows why it was occurring. Your documentation is well structured and follows Doubtfire's guidelines and is in the appropriate format. Thank you for giving me a chance to review your work. |
atharv02-git
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lachlan-robinson , Just went through your work and below are my key takeaways:
- Your resolution addresses the issue of the exposed JavaScript source map, and your response provided a clear explanation of how the problem is mitigated in the production build.
- You've correctly pointed out that the
source mapis only exposed in development builds and it is properly set tosourcemap: falsein the production flag which effectively prevents source maps from being generated in production. - Your documentation is weel-written and effectively conveys your appraoch, one thing here I would like you to add as well to provide a step-by-step guide on how to validate the vulnerability.
Step-by-step Guide for verifying Exposed Source Maps:
I believe the below steps will further strengthen the resolution by ensuring that the source maps are indeed excluded in production builds.
Step 1: Go to the package.json file, and in the scripts section, ensure that the build:angular17 script includes the production flag for the build process:
Before:

After:

Step 2: Then go to doubtfire-web and build your app normally using npm start.
Step 3: The image on the left shows the exposed JavaScript source map (main.js.map) in development mode, while the image on the right indicates that in production mode, the source map is not accessible (resulting in a "Cannot GET" error).

I support Lachlan's recommendation for retesting with a production build to avoid any false positives. Keep up the great work 🫡
|
Hi @lachlan-robinson, I’ve reviewed your response to the exposed JavaScript source map finding and I can confirm that the issue does not persist in production builds. The provided configuration and explanation clearly outlines that the main.js.map file is correctly excluded from production due to the Angular CLI configuration using the --configuration production flag, where "sourceMap": false is explicitly set. Your clarification effectively demonstrates that this is a development-only artifact and not a vulnerability in deployed environments. Thank you for the thorough explanation and the recommendation to align future testing environments with production configurations to avoid such false positives. Best regards, |
aNebula
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Exposed JavaScript Source Map Review
Lachlan Robinson (220325142)
Summary of Finding
The audit conducted by AppAttack identified that the main.js.map file was accessible to
unauthenticated users at http://172.18.0.1:4200/main.js.map. As noted, source maps expose original
source code structures and may lead to reverse engineering or disclosure of sensitive implementation
details.
Assessment and Remediation Status
We acknowledge this as a valid concern and appreciate the identification. However, it is important
to clarify that:
--configuration production flag, which disables the generation and exposure of source maps by
default.
expose source maps publicly.
Recommendation for Retesting
For future vulnerability assessments, we recommend that penetration testing be performed against a
production-equivalent build of the front-end application. This ensures the test environment mirrors
the real-world deployment configuration and avoids false positives related to development-only
artifacts.