Skip to content

ci: supply-chain guardrails for hidden payloads and build scripts (#914, #915, #921, #920) - #924

Merged
dadadave80 merged 5 commits into
Heliobond:mainfrom
dev-susa:feat/914-supply-chain-guardrails
Oct 22, 2026
Merged

dadadave80 merged 5 commits into
Heliobond:mainfrom
dev-susa:feat/914-supply-chain-guardrails

Conversation

@dev-susa

Copy link
Copy Markdown
Contributor

Summary

Four Stellar Wave issues share one root cause: the Heliobond/backend#969 payload (an obfuscated api.js hidden behind tab padding and wired into dev/build/start) passed review, and nothing in this repo would have caught it or limited the damage. This PR adds mechanical checks and the policy that goes with them.

Closes #914
Closes #915
Closes #921
Refs #920

Linked issue

Closes #914, Closes #915, Closes #921. Refs #920.

Type of change

  • Docs / chore
  • Bug fix
  • Feature

Test evidence

  • bun run typecheck: passes
  • bun run lint: 0 errors. Two warnings, both in files this PR does not touch (scripts/check-bundle-size.js, src/lib/format.ts).
  • bun run format:check: passes
  • bun run test: 130 files, 1463 passed, 3 expected failures (pre-existing expected fail cases), exit 0
  • bun run build: not run locally. The change does not touch app code or the bundle, so CI's build job is the check to watch.
  • New tests: scripts/check-hidden-content.test.ts (19 cases: each rule, BOM handling, reviewed exceptions, and a check that the current tree passes) and scripts/check-supply-chain-changes.test.ts (19 cases: watched paths, label gate, package.json key diff, report rendering, truncation, and end-to-end runs against a temporary git repo, including exit codes and the job summary).
  • node scripts/check-hidden-content.mjs on the branch: 0 findings across 381 tracked files.

Notes for reviewers

…eliobond#914)

Adds scripts/check-hidden-content.mjs, run as its own CI job, to catch the
mechanical signatures of the Heliobond/backend#969 payload: lines over 400
characters in source, runs of 8+ tabs or 40+ spaces before code, bidi and
zero-width characters, eval/Function/atob/fromCharCode and escape-run
obfuscation in non-test source, and new root-level scripts not on an
allowlist. Reviewed exceptions are listed explicitly and covered by tests.

Closes Heliobond#914
Adds a review gate for PRs that change package.json scripts or dependencies,
lockfiles, hooks, workflows, or tool configs. The gate prints the exact
changes as plain text (package.json key diffs and the raw diff) to the job
summary and fails until a maintainer applies the supply-chain-reviewed label.

It runs on the pull_request event with no secrets, and reads its checker
from the base branch so a PR cannot change the check that runs on it.

Closes Heliobond#915
…st (Heliobond#921)

SECURITY.md gets a Supply chain section (bun-only with a frozen lockfile,
review rules for scripts, hooks, workflows and tool configs, the new CI
gates, dependency and Action rules) and an Incident response section.
The PR template gets contributor items for root files, scripts and
dependencies and a reviewer checklist. CONTRIBUTING.md gets a step-by-step
guide for reviewing fork PRs safely, linked from both.

Closes Heliobond#921
…Heliobond#920)

The Vercel build receives every project variable, so a malicious build script
on main could read server secrets. The repo cannot change Vercel settings, so
these items are checklist entries a maintainer verifies in the dashboard:
only NEXT_PUBLIC_* in the build step, production deploys gated on CI, and
secret rotation after a reverted merge.

Refs Heliobond#920
@dev-susa
dev-susa requested a review from dadadave80 as a code owner October 22, 2026 13:49
@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

@dev-susa is attempting to deploy a commit to the David Dada's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thanks for the PR! A maintainer will take a look shortly. ✨

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
heliobond Ready Ready Preview Oct 22, 2026 2:08pm UTC

…/dependabot/actions, scan e2e and workflows, fix check names in docs
@github-actions

Copy link
Copy Markdown

Thanks for the PR! A maintainer will take a look shortly. ✨

This branch was successfully deployed

1 active deployment
Preview — 55b408a0 Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants