Skip to content

release: ship GuardScan 1.1.0 through the zero-touch release train - #32

Open
ntanwir10 wants to merge 11 commits into
review/1.1.0-distributionfrom
release/1.1.0
Open

release: ship GuardScan 1.1.0 through the zero-touch release train#32
ntanwir10 wants to merge 11 commits into
review/1.1.0-distributionfrom
release/1.1.0

Conversation

@ntanwir10

@ntanwir10 ntanwir10 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What changed

  • hardens offline scanning, privacy-sensitive state, provider execution, and deterministic npm packaging
  • adds the zero-touch RC-to-stable release train with append-only ledger events, reconciliation, rollback evidence, signed native-artifact contracts, npm/PyPI publication, and moderated-channel tracking
  • binds every train to the exact release PR head, base, and tree and records canonical provider publication evidence
  • adds fail-closed first-stable withdrawal when no ledger-backed known-good release exists, including exact catalog removal, stale publication-PR closure, retry proofs, and explicit provider-actions-pending state
  • adds one shared ntanwir10/homebrew-tap catalog for both Homebrew and Scoop, generated from an immutable GuardScan release manifest and kept in sync through pull requests plus scheduled reconciliation
  • keeps Homebrew Core outside the selected 1.1.0 train while the first-party tap remains authoritative
  • documents one-time provider onboarding, the empty-ledger migration boundary, and public install contracts

Why

The previous release scaffold could not prove native artifacts, cross-channel identity, promotion timing, moderated-provider state, or safe recovery. This release makes GuardScan the single release authority and treats every downstream package definition as a reproducible projection of the same immutable manifest.

Validation at 773a824

  • npm test -- --runInBand --silent — 73 suites, 846 tests
  • npm run test:release — 8 suites, 102 tests
  • npm run typecheck
  • npm run lint:ratchet
  • npm audit --audit-level=high — 0 vulnerabilities
  • npm run test:package
  • local npm, Yarn Classic, and package-manager artifact smoke tests
  • CI pins and exercises pnpm, Yarn Modern, and Bun
  • npm pack --dry-run — 529 files, 732.5 kB packed, 3.9 MB unpacked
  • release workflow YAML, embedded Node heredocs, and JSON schema parsing
  • git diff --check
  • independent release-provider, bootstrap-closure, and rollback-design audits

Hosted checks for the current head are intentionally required before this draft becomes mergeable.

Known unrelated external check

Workers Builds: guardscan-backend is a stale Cloudflare Git integration. It still targets this repository with root directory backend, but that directory was intentionally moved to the private ntanwir10/GuardScan-Monitoring repository in commit cfdc95a. Disconnecting or rewiring that external integration remains separate from this release-train PR.

External onboarding still required

Publication remains fail-closed with RELEASE_AUTOMATION_ENABLED=false until the inert default-branch bootstrap, GitHub App permissions, OIDC trusted publishers, signing identities, moderated-registry credentials, and rehearsals in docs/RELEASE_ONBOARDING.md are complete. No package publication is authorized by merging this draft alone.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
guardscan-backend c787d6e Jul 26 2026, 04:47 AM

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 245 files, which is 145 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ac5c0dd6-194b-430e-914d-0039a84ae9af

📥 Commits

Reviewing files that changed from the base of the PR and between ae98219 and e6de48f.

⛔ Files ignored due to path filters (1)
  • cli/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (245)
  • .github/CODEOWNERS
  • .github/release-ledger/README.md
  • .github/release-ledger/active-versions.json
  • .github/scripts/provider-onboarding-attestation.js
  • .github/scripts/verify-release-workflow-security.test.js
  • .github/workflows/ci.yml
  • .github/workflows/release-build.yml
  • .github/workflows/release-canary.yml
  • .github/workflows/release-credential-health.yml
  • .github/workflows/release-first-withdrawal.yml
  • .github/workflows/release-please.yml
  • .github/workflows/release-provider-rehearsal.yml
  • .github/workflows/release-publish.yml
  • .github/workflows/release-train.yml
  • .gitignore
  • .release-please-manifest.json
  • PRIVACY.md
  • QUICKSTART.md
  • README.md
  • SECURITY.md
  • catalog/homebrew-tap/.github/workflows/verify.yml
  • catalog/homebrew-tap/README.md
  • cli/.nvmrc
  • cli/CHANGELOG.md
  • cli/README.md
  • cli/__tests__/commands/cache.test.ts
  • cli/__tests__/commands/config.test.ts
  • cli/__tests__/commands/init.test.ts
  • cli/__tests__/commands/run.test.ts
  • cli/__tests__/commands/sbom.test.ts
  • cli/__tests__/commands/scan-policy.test.ts
  • cli/__tests__/commands/vuln.test.ts
  • cli/__tests__/contracts/documentation-command-contracts.test.ts
  • cli/__tests__/contracts/monitoring-api.contract.test.ts
  • cli/__tests__/contracts/release-contracts.test.ts
  • cli/__tests__/contracts/telemetry-collector.contract.test.ts
  • cli/__tests__/core/ai-cache.test.ts
  • cli/__tests__/core/cisa-kev.test.ts
  • cli/__tests__/core/config.test.ts
  • cli/__tests__/core/dependency-scanner.test.ts
  • cli/__tests__/core/embedding-store.test.ts
  • cli/__tests__/core/license-scanner.test.ts
  • cli/__tests__/core/linter-integration.test.ts
  • cli/__tests__/core/metrics-collector.test.ts
  • cli/__tests__/core/mutation-tester.test.ts
  • cli/__tests__/core/osv-client.test.ts
  • cli/__tests__/core/package-inventory.test.ts
  • cli/__tests__/core/scan-engine.test.ts
  • cli/__tests__/core/telemetry.test.ts
  • cli/__tests__/core/test-runner.test.ts
  • cli/__tests__/e2e/all-commands.test.ts
  • cli/__tests__/e2e/cli-commands.test.ts
  • cli/__tests__/fixtures/chocolatey-prior/guardscan.nuspec
  • cli/__tests__/fixtures/chocolatey-prior/tools/chocolateyinstall.ps1
  • cli/__tests__/fixtures/chocolatey-prior/tools/chocolateyuninstall.ps1
  • cli/__tests__/integration/ai-providers-enhanced.test.ts
  • cli/__tests__/integration/config-lifecycle.test.ts
  • cli/__tests__/integration/rag-e2e.test.ts
  • cli/__tests__/performance/load-testing.test.ts
  • cli/__tests__/providers/decorators/cached-provider.test.ts
  • cli/__tests__/providers/decorators/circuit-breaker-provider.test.ts
  • cli/__tests__/providers/decorators/observable-provider.test.ts
  • cli/__tests__/providers/decorators/rate-limited-provider.test.ts
  • cli/__tests__/providers/factory.test.ts
  • cli/__tests__/providers/ollama.test.ts
  • cli/__tests__/providers/openai-redirect.test.ts
  • cli/__tests__/providers/token-counter.test.ts
  • cli/__tests__/release/artifact-determinism.test.ts
  • cli/__tests__/release/pull-request-policy.test.ts
  • cli/__tests__/scripts/catalog-workflow.test.ts
  • cli/__tests__/scripts/checkpoint.test.ts
  • cli/__tests__/scripts/deterministic-serialization.test.ts
  • cli/__tests__/scripts/eslint-ratchet.test.ts
  • cli/__tests__/scripts/package-manager-smoke.test.ts
  • cli/__tests__/scripts/release-canary.test.ts
  • cli/__tests__/scripts/release-credential-monitor.test.ts
  • cli/__tests__/scripts/release-governance.test.ts
  • cli/__tests__/scripts/release-please-config.test.ts
  • cli/__tests__/scripts/release-renderers.test.ts
  • cli/__tests__/scripts/release-tool.test.ts
  • cli/__tests__/scripts/release-train.test.ts
  • cli/__tests__/scripts/release-workflows.test.ts
  • cli/__tests__/scripts/standalone-artifact.test.ts
  • cli/__tests__/scripts/standalone-builder.test.ts
  • cli/__tests__/security/injection-tests.test.ts
  • cli/__tests__/setup-env.ts
  • cli/__tests__/utils/execution-policy.test.ts
  • cli/__tests__/utils/path-helper.test.ts
  • cli/__tests__/utils/private-state.test.ts
  • cli/__tests__/utils/process-runner.test.ts
  • cli/__tests__/utils/reporter.test.ts
  • cli/__tests__/utils/runtime-capabilities.test.ts
  • cli/__tests__/utils/telemetry-client.test.ts
  • cli/docs/DEBUGGING.md
  • cli/docs/PERFORMANCE.md
  • cli/docs/TESTING_TOOLS.md
  • cli/jest.config.js
  • cli/package.json
  • cli/schemas/cryptography-defs.schema.json
  • cli/schemas/cyclonedx-1.7.schema.json
  • cli/schemas/guardscan.canary-report.v1.schema.json
  • cli/schemas/guardscan.channel-catalog.v1.schema.json
  • cli/schemas/guardscan.promotion-decision.v1.schema.json
  • cli/schemas/guardscan.release-approval.v1.schema.json
  • cli/schemas/guardscan.release-checkpoint.v1.schema.json
  • cli/schemas/guardscan.release-event.v1.schema.json
  • cli/schemas/guardscan.release-manifest.v1.schema.json
  • cli/schemas/guardscan.release-state.v1.schema.json
  • cli/schemas/guardscan.release-state.v2.schema.json
  • cli/schemas/guardscan.scan.v1.schema.json
  • cli/schemas/jsf-0.82.schema.json
  • cli/schemas/sarif-schema-2.1.0.json
  • cli/schemas/spdx-2.3.schema.json
  • cli/schemas/spdx.schema.json
  • cli/scripts/clean-dist.js
  • cli/scripts/eslint-baseline.json
  • cli/scripts/eslint-ratchet-lib.js
  • cli/scripts/eslint-ratchet.js
  • cli/scripts/package-manager-smoke.js
  • cli/scripts/package-smoke.js
  • cli/scripts/release/archive.js
  • cli/scripts/release/artifact-sbom.js
  • cli/scripts/release/canary.js
  • cli/scripts/release/candidate.js
  • cli/scripts/release/checkpoint.js
  • cli/scripts/release/deterministic.js
  • cli/scripts/release/events.js
  • cli/scripts/release/first-release-withdrawal.js
  • cli/scripts/release/index.js
  • cli/scripts/release/ledger.js
  • cli/scripts/release/lib.js
  • cli/scripts/release/manifest.js
  • cli/scripts/release/npm-artifact.js
  • cli/scripts/release/promotion.js
  • cli/scripts/release/provenance.js
  • cli/scripts/release/publication-evidence.js
  • cli/scripts/release/pull-request-policy.js
  • cli/scripts/release/python-wheel.js
  • cli/scripts/release/reconcile.js
  • cli/scripts/release/recovery-source.js
  • cli/scripts/release/remote.js
  • cli/scripts/release/renderers.js
  • cli/scripts/release/runtime-artifact-policy.js
  • cli/scripts/release/standalone-artifact.js
  • cli/scripts/release/standalone.js
  • cli/scripts/release/validators.js
  • cli/src/commands/cache.ts
  • cli/src/commands/capabilities.ts
  • cli/src/commands/chat.ts
  • cli/src/commands/commit.ts
  • cli/src/commands/config.ts
  • cli/src/commands/docs.ts
  • cli/src/commands/explain.ts
  • cli/src/commands/init.ts
  • cli/src/commands/metrics.ts
  • cli/src/commands/migrate.ts
  • cli/src/commands/models.ts
  • cli/src/commands/mutation.ts
  • cli/src/commands/perf.ts
  • cli/src/commands/refactor.ts
  • cli/src/commands/reset.ts
  • cli/src/commands/review.ts
  • cli/src/commands/routing.ts
  • cli/src/commands/run.ts
  • cli/src/commands/sbom.ts
  • cli/src/commands/scan.ts
  • cli/src/commands/security.ts
  • cli/src/commands/status.ts
  • cli/src/commands/telemetry.ts
  • cli/src/commands/test-gen.ts
  • cli/src/commands/test.ts
  • cli/src/commands/threat-model.ts
  • cli/src/commands/vuln.ts
  • cli/src/constants/api-constants.ts
  • cli/src/core/ai-cache.ts
  • cli/src/core/bounded-response.ts
  • cli/src/core/cisa-kev.ts
  • cli/src/core/codebase-indexer.ts
  • cli/src/core/config.ts
  • cli/src/core/cost-guard.ts
  • cli/src/core/dependency-scanner.ts
  • cli/src/core/embedding-chunker.ts
  • cli/src/core/embedding-indexer.ts
  • cli/src/core/embedding-store.ts
  • cli/src/core/embeddings.ts
  • cli/src/core/license-scanner.ts
  • cli/src/core/linter-integration.ts
  • cli/src/core/loc-counter.ts
  • cli/src/core/metrics-collector.ts
  • cli/src/core/mutation-tester.ts
  • cli/src/core/osv-client.ts
  • cli/src/core/package-inventory.ts
  • cli/src/core/performance-tester.ts
  • cli/src/core/repository.ts
  • cli/src/core/rule-engine.ts
  • cli/src/core/scan-engine.ts
  • cli/src/core/secrets-detector.ts
  • cli/src/core/telemetry.ts
  • cli/src/core/test-runner.ts
  • cli/src/core/vulnerability-cache.ts
  • cli/src/features/code-review.ts
  • cli/src/features/commit-generator.ts
  • cli/src/index.ts
  • cli/src/parsers/python-parser.ts
  • cli/src/providers/decorators/cached-provider.ts
  • cli/src/providers/decorators/circuit-breaker-provider.ts
  • cli/src/providers/decorators/observable-provider.ts
  • cli/src/providers/embedding-factory.ts
  • cli/src/providers/embedding-lmstudio.ts
  • cli/src/providers/embedding-ollama.ts
  • cli/src/providers/factory.ts
  • cli/src/providers/ollama.ts
  • cli/src/providers/openai.ts
  • cli/src/providers/token-counter.ts
  • cli/src/utils/api-client.ts
  • cli/src/utils/chart-generator.ts
  • cli/src/utils/error-handler.ts
  • cli/src/utils/execution-policy.ts
  • cli/src/utils/monitoring.ts
  • cli/src/utils/path-helper.ts
  • cli/src/utils/private-state.ts
  • cli/src/utils/process-runner.ts
  • cli/src/utils/reporter.ts
  • cli/src/utils/runtime-capabilities.ts
  • cli/src/utils/telemetry-client.ts
  • cli/src/utils/version.ts
  • docs/AI_QUICK_REFERENCE.md
  • docs/API.md
  • docs/DOCKER_GUIDE.md
  • docs/FUNCTIONAL_ACCEPTANCE.md
  • docs/GETTING_STARTED.md
  • docs/RATE_LIMITING.md
  • docs/RELEASE_AUTOMATION.md
  • docs/RELEASE_ONBOARDING.md
  • docs/VULNERABILITY_SCANNING.md
  • docs/adrs/001-cloudflare-workers-backend.md
  • docs/adrs/003-privacy-first-architecture.md
  • docs/adrs/005-byok-ai-model.md
  • docs/adrs/006-node-sea-standalone-distribution.md
  • docs/adrs/007-retire-hosted-cloudflare-telemetry.md
  • docs/adrs/README.md
  • release-please-config.json
  • tasks/plan.md
  • tasks/session-handoff-2026-08-02.md
  • tasks/todo.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

const versionMatch = line.match(/^\s+version\s+["']?([^"'\s]+)["']?/);
if (versionMatch && semver.valid(versionMatch[1], { loose: true })) {

P1 Badge Support Yarn Modern's colon-delimited version field

For a Yarn Modern lockfile, entries use version: 4.17.21 rather than Yarn Classic's version "4.17.21", so this regex silently extracts no coordinates. Because parseExactPackageJson also skips a package manifest whenever an ancestor yarn.lock exists, a typical Yarn Modern repository can then report complete vulnerability coverage while querying zero npm packages; parse both lockfile syntaxes and report unsupported records as inventory errors.


} catch {
// Preserve malformed or unsupported upstream vectors without trusting them for policy severity.
}
return { severity: 'unknown', cvss: { version: entry.type, vector: entry.score, source } };

P2 Badge Keep scanning after an unsupported CVSS vector

When an OSV severity array contains an unsupported or malformed CVSS vector before a valid CVSS 3.0/3.1 entry, this unconditional return stops processing the remaining entries. If the advisory has no qualitative severity fallback, a later high or critical score is therefore classified as unknown and reduced to the medium policy default, allowing --fail-on high to miss it; preserve the raw vector but continue looking for a supported score.


const errors = inventoryErrors(inventory.errors);
if (options.strictInventory && errors.length > 0 && !options.allowPartial) {
throw new DependencyScanError('INVENTORY_INCOMPLETE', 'Dependency inventory contains unresolved or invalid package data', errors);
}
if (inventory.coordinates.length === 0) {return [];}

P1 Badge Preserve inventory errors when no coordinates resolve

When every dependency is unresolved or malformed and --allow-partial is supplied, this early return discards all accumulated inventory errors. The dedicated vuln command then renders the run as complete, reports zero unresolved packages, prints “No known vulnerabilities,” and exits successfully even though it covered nothing; return an explicit partial result carrying the inventory errors instead of an empty result array.


for (const testFile of result.testResults || []) {
for (const testCase of testFile.assertionResults || []) {

P1 Badge Count Jest suite-level failures

When Jest fails a suite before running assertions—for example because a test file has a syntax error or cannot import a module—the JSON report contains a failed suite with an empty assertionResults array. This loop records zero failures and returns a successful-looking test result despite Jest's nonzero status, so scan --run-project-code can pass its test policy; account for failed suite counts/status and their failure messages in addition to assertion failures.


return {
framework: 'pytest',
totalTests: report.summary?.total || 0,
passed: report.summary?.passed || 0,
failed: report.summary?.failed || 0,
skipped: report.summary?.skipped || 0,

P1 Badge Treat pytest collection errors as execution failures

If pytest writes its JSON report but exits during collection or initialization, report.summary.failed may be zero because no tests ran, while the process exits nonzero and collector errors are recorded elsewhere in the report. Returning only these summary test counts makes that run appear successful to the scan policy; check the pytest exit status and collection errors, while still preserving ordinary assertion failures as policy data.


if (event.Test && event.Action) {
if (event.Action === 'pass') {
totalTests++;
passed++;
} else if (event.Action === 'fail') {
totalTests++;

P1 Badge Fail Go test runs on package-level failures

For compilation, setup, or package-level go test failures, the JSON stream emits a failing package event without a Test field. Because only test-scoped events are processed here and the nonzero process status is otherwise ignored, the adapter returns zero failed tests and the comprehensive scan can pass; treat a nonzero run with no captured test failures as an operational failure or represent package failures explicitly.


const group = block.match(/<groupId>\s*([^<\s]+)\s*<\/groupId>/)?.[1];
const artifact = block.match(/<artifactId>\s*([^<\s]+)\s*<\/artifactId>/)?.[1];
const version = block.match(/<version>\s*([^<\s]+)\s*<\/version>/)?.[1];
if (!group || !artifact || !version || version.includes('${')) {continue;}

P1 Badge Report unresolved Maven property versions

Maven projects commonly declare exact dependency versions through local properties such as <version>${library.version}</version> or inherit them from dependencyManagement, but this branch silently skips those dependencies without adding an inventory error. A project using only such declarations therefore produces zero Maven coordinates while the vulnerability scan reports complete coverage; resolve locally defined versions or mark each unsupported dependency as unresolved so strict scans fail closed.


return {
exists: true,
fresh: Number.isFinite(ageDays) && ageDays <= maxAgeDays,
inventoryMatches: snapshot.inventoryDigest === inventory.digest,
ageDays,
snapshot,

P2 Badge Bind offline snapshots to the configured OSV endpoint

After an online snapshot is created from one OSV endpoint, changing vulnerabilities.endpoint or GUARDSCAN_OSV_URL does not invalidate it because freshness checks compare only the inventory digest. An offline run can consequently claim complete coverage using data from a different advisory source even though sourceEndpoint is persisted in the snapshot; pass the expected normalized endpoint into this check and treat a mismatch like missing coverage.


type: 'library',
'bom-ref': purl,
name: finding.package,
version: finding.version,
purl,
scope: 'required',
licenses: [{

P2 Badge Preserve dependency scope in CycloneDX components

The inventory distinguishes runtime, development, and optional dependencies, but that scope is dropped when creating LicenseFinding objects and every CycloneDX component is emitted as required. For repositories with dev or optional dependencies, downstream SBOM consumers are therefore told that packages not needed at runtime are required and the root dependsOn list reinforces the same incorrect relationship; carry the inventory scope through and map it to the appropriate CycloneDX scope/dependency relationship.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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