Repository navigation
Add Angular - #19
Merged
Merged
Add Angular#19
Conversation
Six checks. The critical one is credentials in environment files: those files are compiled into the bundle the browser downloads, so a key placed there is not configuration, it is published, and the file name suggests otherwise to everyone who reads it. Two are about the difference between a build and a deploy. The development configuration disables optimisation and keeps debugging aids, and the application still works, which is how a build script that omits the production configuration survives for months. The development server is worse: it rebuilds on file changes and was never meant to face the internet, and it ends up in containers because it is the command everyone already knows. The remaining three: source maps not published, so the original source cannot be reconstructed; hashed file names, so a deploy invalidates itself rather than leaving a browser with yesterday's bundle against today's index; and a bundle budget that fails the build rather than printing a warning nobody reads. Every reference was checked before being cited this time, and every command was run against a workspace that gets all six wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tier 2, item 2.
universal → javascript → web → javascript.angular, 6 new checks.The critical one
no-secrets-in-environment-files. Environment files are compiled into thebundle the browser downloads — a key placed there is not configuration, it is
published. The file name actively suggests otherwise, which is why this
keeps happening. The action says the part people resist: a key that shipped is a
key that leaked, so rotate it whether or not anyone noticed.
Build versus deploy
Two checks separate those, because the failure is quiet in both:
production-configuration-used— the development configuration disablesoptimisation and keeps debugging aids, and the app still works. That is how
a build script missing
--configuration productionsurvives for months.dev-server-not-serving-production—ng serverebuilds on file changesand was never meant to face the internet. It reaches containers because it is
the command everyone already knows.
The rest
Source maps not published (they reconstruct the original source, comments
included), output hashing on (otherwise a browser serves yesterday's bundle
against today's index — a half-updated app failing in ways nobody can
reproduce), and a bundle budget with an error threshold rather than a
warning nobody reads.
Verification
Every reference was checked for a 200 before being cited, rather than after
the link check caught it — the lesson from the Gin PR, where the entire
/en/docs/examples/tree turned out to be gone.Every command was run against a workspace getting all six wrong:
apiKey: 'sk_live_...'inenvironment.prod.ts,sourceMap: trueunderproduction,
outputHashing: "none", a budget with onlymaximumWarning,CMD ["ng", "serve"], and no build step on the deploy path at all. Eachsurfaced its finding.