Skip to content

Add Angular - #19

Merged
oritromax merged 1 commit into
mainfrom
add-angular
Aug 22, 2026
Merged

oritromax merged 1 commit into
mainfrom
add-angular

Conversation

@oritromax

Copy link
Copy Markdown
Owner

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 the
bundle 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 disables
    optimisation and keeps debugging aids, and the app still works. That is how
    a build script missing --configuration production survives for months.
  • dev-server-not-serving-production — ng serve rebuilds on file changes
    and 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_...' in environment.prod.ts, sourceMap: true under
production, outputHashing: "none", a budget with only maximumWarning,
CMD ["ng", "serve"], and no build step on the deploy path at all. Each
surfaced its finding.

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.
@oritromax
oritromax merged commit d165ae3 into main Aug 22, 2026
1 check passed
@oritromax
oritromax deleted the add-angular branch August 22, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant