Skip to content

[INT-3874] Harden CI workflow and fix red audit gate - #130

Open
diego-suntaxi-onfleet wants to merge 3 commits into
masterfrom
INT-3874-ci-improvements
Open

diego-suntaxi-onfleet wants to merge 3 commits into
masterfrom
INT-3874-ci-improvements

Conversation

@diego-suntaxi-onfleet

@diego-suntaxi-onfleet diego-suntaxi-onfleet commented Sep 15, 2026

Copy link
Copy Markdown

Describe the solution

The Security audit job on master failed on 2026-09-15 because the lockfile pinned js-yaml 4.1.1 and older brace-expansion releases with high-severity advisories. That part has since landed on master through #131 and #132 (this branch is merged up to them and no longer changes package.json or the lockfile). What remains here is the CI hardening: run concurrency, job timeouts, current action versions, and removal of the dead Travis config.

Most of the original CI work (PR-level workflow, Node 20/22/24 matrix, lint/audit/coverage jobs, createRequire import fix, lint baseline) already landed in #127 and is not repeated here.

Two deliberate choices:

  • No paths-ignore for README/CHANGELOG. Once branch protection requires these checks, a workflow that is skipped for docs-only changes never reports them, and the PR cannot be merged. Each job takes about 20 seconds, so always running is cheap. A comment in ci.yml records this.
  • engines stays at >=20.0.0. The >=20.10.0 bump was only needed for the with { type: 'json' } import syntax, which [INT-3686] Overhaul CI/CD and quality assurance #127 replaced with createRequire.

Verified with fnm on Node 20.20.2, 22.22.2 and 24.15.0: npm ci, npm run lint (0 errors), npm test (44 passing), npm run coverage (thresholds met), npm audit --audit-level=high (0 vulnerabilities).


Changed

  • ci.yml: concurrency with cancel-in-progress so superseded runs on the same branch/PR are cancelled; timeout-minutes: 10 on every job in both ci.yml and npm-publish.yml.
  • ci.yml and npm-publish.yml: actions/checkout, actions/setup-node and actions/upload-artifact bumped to v7. The v2/v4 releases target the deprecated Node 20 runner and now emit warnings on every job.

Removed

  • .travis.yml (dead since GitHub Actions was adopted).

Security


Follow-up for a repo admin after this merges (not doable from a PR)

Settings → Branches → master → enable Require status checks to pass before merging with Require branches to be up to date before merging, and select these checks:

  • Lint
  • Test (Node 20)
  • Test (Node 22)
  • Test (Node 24)
  • Security audit
  • Coverage

The names only appear in the picker after they have run at least once, which this PR's CI run takes care of.

🤖 Generated with Claude Code

Review in cubic

- Regenerate package-lock.json via `npm audit fix`: js-yaml 4.1.1 -> 4.3.2
  and brace-expansion 1.x/2.x/5.x to patched releases. Clears the two
  high-severity advisories that have failed the Security audit job on
  master since 2026-09-15. package.json is unchanged.
- ci.yml: add concurrency (cancel superseded runs per branch/PR) and a
  10-minute timeout on every job. No paths-ignore on purpose: with required
  status checks, a skipped workflow leaves docs-only PRs unmergeable
  (explained in a comment in the file).
- ci.yml + npm-publish.yml: bump actions/checkout, actions/setup-node and
  actions/upload-artifact to v7. The v2/v4 releases target the deprecated
  Node 20 runner and now emit warnings on every job.
- Remove dead .travis.yml.
- CHANGELOG: Unreleased entry.

Already done on master by #127 and therefore not repeated here: lockfile
JSON repair, createRequire replacing the JSON import attribute, Node
20/22/24 matrix, lint/audit/coverage jobs, mocha env for test/**.
engines stays at >=20.0.0 because the `with {}` syntax that motivated
>=20.10.0 is no longer used.

Verified with fnm on Node 20.20.2, 22.22.2 and 24.15.0: npm ci, lint (0
errors), 44 tests passing, coverage thresholds met, audit clean at high.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread CHANGELOG.md Outdated
Comment thread .github/workflows/npm-publish.yml
Comment thread CHANGELOG.md Outdated
- npm-publish.yml: timeout-minutes: 10 on build, publish and notify so a
  stalled release job fails fast instead of holding a runner for 6 hours.
  No concurrency group on purpose: cancelling an in-flight npm publish is
  worse than a slow one, and release-triggered runs do not overlap.
- CHANGELOG: only v4 of the bumped actions targets the Node 20 runtime
  (v2 was node12/16), so the parenthetical now says v4.
- CHANGELOG: lockfile advisory fix moved from Changed to Security, per
  Keep a Changelog and the repo PR template.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. Bumps GitHub Actions to v7, adds CI concurrency/timeouts, drops the dead Travis config, and regenerates package-lock.json to clear dev-only audit advisories without changing package.json; a bounded CI/security hardening change.

Re-trigger cubic

Resolve package-lock.json conflict by taking master's version: #131 and
#132 already landed the same js-yaml 4.3.2 / brace-expansion patches
plus new overrides, so this branch no longer changes dependencies.
Verified: npm ci in sync, audit clean at high, lint OK, 44 tests passing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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