@marinjursic/prc-linux-arm64 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/bin/LICENSE +21 -0
- package/bin/README.md +335 -0
- package/bin/THIRD_PARTY_NOTICES.md +74 -0
- package/bin/adapters/checkov-v3.3.8.yaml +50 -0
- package/bin/adapters/gitleaks-v8.30.0.yaml +63 -0
- package/bin/adapters/grype-v0.116.1.yaml +58 -0
- package/bin/adapters/syft-v1.51.0.yaml +54 -0
- package/bin/catalog/assertions/core-repository.yaml +625 -0
- package/bin/catalog/assertions/iac.yaml +24 -0
- package/bin/catalog/assertions/supply-chain.yaml +45 -0
- package/bin/catalog/control-contracts.json +1 -0
- package/bin/catalog/control-id-registry.json +110470 -0
- package/bin/catalog/objectives/core-repository.yaml +243 -0
- package/bin/catalog/objectives/iac.yaml +13 -0
- package/bin/catalog/objectives/supply-chain.yaml +13 -0
- package/bin/catalog/profiles/api.yaml +12 -0
- package/bin/catalog/profiles/core-repository.yaml +49 -0
- package/bin/catalog/profiles/iac.yaml +18 -0
- package/bin/catalog/profiles/kubernetes.yaml +15 -0
- package/bin/catalog/profiles/quick.yaml +27 -0
- package/bin/catalog/profiles/supply-chain.yaml +20 -0
- package/bin/docs/architecture/adapters.md +380 -0
- package/bin/docs/architecture/agent-providers.md +188 -0
- package/bin/docs/architecture/applicability.md +80 -0
- package/bin/docs/architecture/catalog-integrity.md +85 -0
- package/bin/docs/architecture/evidence-and-results.md +154 -0
- package/bin/docs/architecture/execution-plans.md +61 -0
- package/bin/docs/architecture/product-contract.md +76 -0
- package/bin/docs/architecture/publisher-trust.md +68 -0
- package/bin/docs/architecture/remediation-contract.md +113 -0
- package/bin/docs/architecture/trust-model.md +95 -0
- package/bin/docs/assets/hero.svg +37 -0
- package/bin/docs/assets/logo.svg +13 -0
- package/bin/docs/assets/production-readiness-scan-demo-poster.png +0 -0
- package/bin/docs/assets/production-readiness-scan-demo.gif +0 -0
- package/bin/docs/assets/production-readiness-scan-demo.mp4 +0 -0
- package/bin/docs/assets/social-card.png +0 -0
- package/bin/docs/assets/social-card.svg +40 -0
- package/bin/docs/checklists/00-readiness-principle.md +17 -0
- package/bin/docs/checklists/01-release-foundations.md +91 -0
- package/bin/docs/checklists/02-product-risk-architecture.md +136 -0
- package/bin/docs/checklists/03-source-build-supply-chain.md +97 -0
- package/bin/docs/checklists/04-environments-quality-experience.md +226 -0
- package/bin/docs/checklists/05-application-security.md +320 -0
- package/bin/docs/checklists/06-data-privacy-performance.md +166 -0
- package/bin/docs/checklists/07-reliability-operations.md +355 -0
- package/bin/docs/checklists/08-maintenance-vendors-compliance.md +112 -0
- package/bin/docs/checklists/09-conditional-modules.md +229 -0
- package/bin/docs/checklists/10-evidence-and-decision.md +111 -0
- package/bin/docs/engineering/00-overview.md +51 -0
- package/bin/docs/engineering/01-governance-and-foundations.md +919 -0
- package/bin/docs/engineering/02-product-and-requirements.md +186 -0
- package/bin/docs/engineering/03-user-experience-web-and-content.md +1352 -0
- package/bin/docs/engineering/04-architecture-and-design.md +387 -0
- package/bin/docs/engineering/05-code-quality-and-implementation.md +1103 -0
- package/bin/docs/engineering/06-application-services-and-apis.md +476 -0
- package/bin/docs/engineering/07-data-and-information-lifecycle.md +1009 -0
- package/bin/docs/engineering/08-security-and-cryptography.md +1215 -0
- package/bin/docs/engineering/09-privacy-and-data-protection.md +205 -0
- package/bin/docs/engineering/10-verification-and-testing.md +841 -0
- package/bin/docs/engineering/11-developer-experience-platform-and-delivery.md +1013 -0
- package/bin/docs/engineering/12-operations-sre-and-support.md +795 -0
- package/bin/docs/engineering/13-documentation-and-knowledge.md +349 -0
- package/bin/docs/engineering/14-trust-safety-and-ecosystems.md +330 -0
- package/bin/docs/engineering/15-ai-ml-and-ai-assisted-development.md +785 -0
- package/bin/docs/engineering/16-specialized-domains-and-release-assurance.md +775 -0
- package/bin/docs/engineering/source-manifest.md +479 -0
- package/bin/docs/guides/ai-assisted-review.md +61 -0
- package/bin/docs/guides/getting-started.md +78 -0
- package/bin/docs/index.md +66 -0
- package/bin/docs/prompts/evidence-challenge.md +26 -0
- package/bin/docs/prompts/full-readiness-review.md +34 -0
- package/bin/docs/prompts/release-diff-review.md +31 -0
- package/bin/docs/records/evidence-record.md +42 -0
- package/bin/docs/records/go-no-go-decision.md +63 -0
- package/bin/docs/records/release-assessment.md +124 -0
- package/bin/docs/records/risk-exception.md +64 -0
- package/bin/docs/references.md +52 -0
- package/bin/docs/scanner/ai-control-review.md +208 -0
- package/bin/docs/scanner/benchmarks.md +122 -0
- package/bin/docs/scanner/cli-contract.md +130 -0
- package/bin/docs/scanner/configuration.md +101 -0
- package/bin/docs/scanner/control-contracts.md +47 -0
- package/bin/docs/scanner/core-repository.md +62 -0
- package/bin/docs/scanner/diff-and-invalidation.md +79 -0
- package/bin/docs/scanner/doctor.md +71 -0
- package/bin/docs/scanner/getting-started.md +355 -0
- package/bin/docs/scanner/go-http-timeouts.md +96 -0
- package/bin/docs/scanner/infrastructure-policy.md +64 -0
- package/bin/docs/scanner/kubernetes-workloads.md +63 -0
- package/bin/docs/scanner/mcp-agent-integration.md +138 -0
- package/bin/docs/scanner/openapi-contracts.md +75 -0
- package/bin/docs/scanner/private-key-armor.md +44 -0
- package/bin/docs/scanner/releases.md +160 -0
- package/bin/docs/scanner/remediation.md +273 -0
- package/bin/docs/scanner/risk-exceptions.md +52 -0
- package/bin/docs/scanner/security-walkthrough.md +236 -0
- package/bin/docs/scanner/state-and-history.md +113 -0
- package/bin/docs/scanner/supply-chain.md +132 -0
- package/bin/docs/scanner/test-discovery.md +60 -0
- package/bin/docs/stylesheets/extra.css +183 -0
- package/bin/fixtures/benchmarks/core-native/suite-comprehensive.yaml +302 -0
- package/bin/fixtures/benchmarks/core-native/suite.yaml +59 -0
- package/bin/fixtures/benchmarks/core-native/targets/baseline/README.md +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/baseline/app.go +1 -0
- package/bin/fixtures/benchmarks/core-native/targets/conflict-template/app.js +5 -0
- package/bin/fixtures/benchmarks/core-native/targets/container-risky-template/Dockerfile +2 -0
- package/bin/fixtures/benchmarks/core-native/targets/container-valid/Dockerfile +2 -0
- package/bin/fixtures/benchmarks/core-native/targets/dependency-lock-missing/package.json +5 -0
- package/bin/fixtures/benchmarks/core-native/targets/dependency-lock-present/package-lock.json +6 -0
- package/bin/fixtures/benchmarks/core-native/targets/dependency-lock-present/package.json +5 -0
- package/bin/fixtures/benchmarks/core-native/targets/empty-manifest-template/package.json +1 -0
- package/bin/fixtures/benchmarks/core-native/targets/final-newline-template/app.py +1 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/.github/CODEOWNERS +1 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/.github/dependabot.yml +6 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/.github/workflows/validate.yml +15 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/CODE_OF_CONDUCT.md +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/CONTRIBUTING.md +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/LICENSE +1 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/README.md +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/SECURITY.md +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/package-lock.json +6 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/package.json +7 -0
- package/bin/fixtures/benchmarks/core-native/targets/foundation-present/tests/example.test.js +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-server-timeout-risky-template/go.mod +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-server-timeout-risky-template/server.go +18 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-timeout-malformed-template/client.go +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-timeout-malformed-template/go.mod +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-timeout-risky-template/client.go +7 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-timeout-risky-template/go.mod +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-timeout-safe/client.go +22 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-timeout-safe/go.mod +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/go-http-timeout-safe/hazards_test.go +8 -0
- package/bin/fixtures/benchmarks/core-native/targets/kubernetes-risky-template/deployment.yaml +27 -0
- package/bin/fixtures/benchmarks/core-native/targets/kubernetes-valid/deployment.yaml +26 -0
- package/bin/fixtures/benchmarks/core-native/targets/openapi-operation-ids-risky-template/openapi.yaml +17 -0
- package/bin/fixtures/benchmarks/core-native/targets/openapi-operation-responses-risky-template/openapi.yaml +11 -0
- package/bin/fixtures/benchmarks/core-native/targets/openapi-root-malformed-template/openapi.yaml +5 -0
- package/bin/fixtures/benchmarks/core-native/targets/openapi-root-risky-template/openapi.yaml +5 -0
- package/bin/fixtures/benchmarks/core-native/targets/openapi-root-valid/openapi.yaml +17 -0
- package/bin/fixtures/benchmarks/core-native/targets/package-test-command/app.js +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/package-test-command/package.json +7 -0
- package/bin/fixtures/benchmarks/core-native/targets/package-test-placeholder/app.js +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/package-test-placeholder/package.json +7 -0
- package/bin/fixtures/benchmarks/core-native/targets/private-key-template/deploy.pem +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/readme-missing/fixture.txt +1 -0
- package/bin/fixtures/benchmarks/core-native/targets/runtime-missing/package-lock.json +6 -0
- package/bin/fixtures/benchmarks/core-native/targets/runtime-missing/package.json +4 -0
- package/bin/fixtures/benchmarks/core-native/targets/terraform-locked/.terraform.lock.hcl +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/terraform-locked/main.tf +7 -0
- package/bin/fixtures/benchmarks/core-native/targets/terraform-unlocked-template/.terraform.lock.hcl +3 -0
- package/bin/fixtures/benchmarks/core-native/targets/terraform-unlocked-template/main.tf +7 -0
- package/bin/fixtures/benchmarks/core-native/targets/test-declaration-valid/app.py +2 -0
- package/bin/fixtures/benchmarks/core-native/targets/test-declaration-valid/tests/test_app.py +5 -0
- package/bin/fixtures/benchmarks/core-native/targets/test-path-without-declaration/app.py +2 -0
- package/bin/fixtures/benchmarks/core-native/targets/test-path-without-declaration/tests/test_app.py +1 -0
- package/bin/fixtures/benchmarks/core-native/targets/workflow-malformed/.github/workflows/validate.yml +1 -0
- package/bin/fixtures/benchmarks/core-native/targets/workflow-no-jobs/.github/workflows/empty.yml +9 -0
- package/bin/fixtures/benchmarks/core-native/targets/workflow-risky/.github/workflows/risky.yml +10 -0
- package/bin/fixtures/benchmarks/core-native/targets/workflow-valid/.github/workflows/validate.yml +14 -0
- package/bin/packs/core-foundation.yaml +25 -0
- package/bin/packs/core-native.yaml +59 -0
- package/bin/prc +0 -0
- package/bin/schemas/adapter-execution-v0.1.schema.json +101 -0
- package/bin/schemas/adapter-execution-v0.2.schema.json +128 -0
- package/bin/schemas/adapter-execution.schema.json +145 -0
- package/bin/schemas/adapter-fixture-report.schema.json +59 -0
- package/bin/schemas/adapter-fixture-suite.schema.json +104 -0
- package/bin/schemas/adapter-manifest-v0.1.schema.json +55 -0
- package/bin/schemas/adapter-manifest-v0.2.schema.json +122 -0
- package/bin/schemas/adapter-manifest-v0.3.schema.json +172 -0
- package/bin/schemas/adapter-manifest.schema.json +299 -0
- package/bin/schemas/adapter-message.schema.json +136 -0
- package/bin/schemas/adapter-registry-report.schema.json +13 -0
- package/bin/schemas/adapter-registry.schema.json +47 -0
- package/bin/schemas/agent-execution-v0.1.schema.json +26 -0
- package/bin/schemas/agent-execution.schema.json +26 -0
- package/bin/schemas/agent-failure-v0.1.schema.json +102 -0
- package/bin/schemas/agent-failure.schema.json +102 -0
- package/bin/schemas/agent-output-v0.1.schema.json +36 -0
- package/bin/schemas/agent-output.schema.json +36 -0
- package/bin/schemas/agent-task-v0.1.schema.json +44 -0
- package/bin/schemas/agent-task.schema.json +46 -0
- package/bin/schemas/assertion-catalog.schema.json +69 -0
- package/bin/schemas/benchmark-report.schema.json +94 -0
- package/bin/schemas/benchmark-suite.schema.json +116 -0
- package/bin/schemas/catalog-bundle.schema.json +27 -0
- package/bin/schemas/catalog-manifest.schema.json +23 -0
- package/bin/schemas/checkov-iac-policy-report.schema.json +82 -0
- package/bin/schemas/control-contracts.schema.json +44 -0
- package/bin/schemas/control-review-output.schema.json +51 -0
- package/bin/schemas/doctor.schema.json +53 -0
- package/bin/schemas/evidence-v0.1.schema.json +21 -0
- package/bin/schemas/evidence.schema.json +21 -0
- package/bin/schemas/finding-v0.1.schema.json +70 -0
- package/bin/schemas/finding.schema.json +70 -0
- package/bin/schemas/fix-contract-v0.1.schema.json +35 -0
- package/bin/schemas/fix-contract-v0.2.schema.json +46 -0
- package/bin/schemas/fix-contract-v0.3.schema.json +49 -0
- package/bin/schemas/fix-contract.schema.json +49 -0
- package/bin/schemas/grype-vulnerability-report.schema.json +88 -0
- package/bin/schemas/history.schema.json +37 -0
- package/bin/schemas/invalidation.schema.json +86 -0
- package/bin/schemas/inventory-v0.1.schema.json +42 -0
- package/bin/schemas/inventory-v0.2.schema.json +95 -0
- package/bin/schemas/inventory-v0.3.schema.json +139 -0
- package/bin/schemas/inventory.schema.json +139 -0
- package/bin/schemas/objective-catalog.schema.json +62 -0
- package/bin/schemas/pack-report.schema.json +16 -0
- package/bin/schemas/pack.schema.json +53 -0
- package/bin/schemas/plan-v0.1.schema.json +31 -0
- package/bin/schemas/plan-v0.2.schema.json +32 -0
- package/bin/schemas/plan-v0.3.schema.json +44 -0
- package/bin/schemas/plan-v0.4.schema.json +48 -0
- package/bin/schemas/plan-v0.5.schema.json +49 -0
- package/bin/schemas/plan-v0.6.schema.json +137 -0
- package/bin/schemas/plan.schema.json +137 -0
- package/bin/schemas/profile.schema.json +42 -0
- package/bin/schemas/project-config.schema.json +128 -0
- package/bin/schemas/release-manifest-v0.1.schema.json +86 -0
- package/bin/schemas/release-manifest-v0.2.schema.json +146 -0
- package/bin/schemas/release-manifest-v0.3.schema.json +146 -0
- package/bin/schemas/release-manifest.schema.json +6 -0
- package/bin/schemas/remediation-candidate-v0.1.schema.json +51 -0
- package/bin/schemas/remediation-candidate-v0.2.schema.json +51 -0
- package/bin/schemas/remediation-candidate-v0.3.schema.json +51 -0
- package/bin/schemas/remediation-candidate-v0.4.schema.json +69 -0
- package/bin/schemas/remediation-candidate.schema.json +69 -0
- package/bin/schemas/remediation-run-v0.1.schema.json +69 -0
- package/bin/schemas/remediation-run-v0.2.schema.json +78 -0
- package/bin/schemas/remediation-run-v0.3.schema.json +86 -0
- package/bin/schemas/remediation-run-v0.4.schema.json +86 -0
- package/bin/schemas/remediation-run-v0.5.schema.json +131 -0
- package/bin/schemas/remediation-run-v0.6.schema.json +143 -0
- package/bin/schemas/remediation-run-v0.7.schema.json +160 -0
- package/bin/schemas/remediation-run-v0.8.schema.json +161 -0
- package/bin/schemas/remediation-run.schema.json +161 -0
- package/bin/schemas/risk-exception-verification.schema.json +17 -0
- package/bin/schemas/risk-exception.schema.json +137 -0
- package/bin/schemas/run-result-v0.1.schema.json +54 -0
- package/bin/schemas/run-result-v0.10.schema.json +64 -0
- package/bin/schemas/run-result-v0.11.schema.json +146 -0
- package/bin/schemas/run-result-v0.2.schema.json +60 -0
- package/bin/schemas/run-result-v0.3.schema.json +52 -0
- package/bin/schemas/run-result-v0.4.schema.json +52 -0
- package/bin/schemas/run-result-v0.5.schema.json +60 -0
- package/bin/schemas/run-result-v0.6.schema.json +61 -0
- package/bin/schemas/run-result-v0.7.schema.json +61 -0
- package/bin/schemas/run-result-v0.8.schema.json +61 -0
- package/bin/schemas/run-result-v0.9.schema.json +77 -0
- package/bin/schemas/run-result.schema.json +165 -0
- package/bin/schemas/signature-verification.schema.json +22 -0
- package/bin/schemas/signature.schema.json +18 -0
- package/bin/schemas/state-check-v0.1.schema.json +27 -0
- package/bin/schemas/state-check.schema.json +28 -0
- package/bin/schemas/trust-store.schema.json +50 -0
- package/bin/schemas/verification-execution-v0.1.schema.json +105 -0
- package/bin/schemas/verification-execution.schema.json +105 -0
- package/bin/schemas/version-v0.1.schema.json +27 -0
- package/bin/schemas/version.schema.json +27 -0
- package/manifest.json +9 -0
- package/package.json +28 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Safe AI review of all controls
|
|
2
|
+
|
|
3
|
+
`prc scan` always puts all 10,042 controls in the report. By default it checks
|
|
4
|
+
only facts that the local scanner can prove safely. Broad questions stay
|
|
5
|
+
`needs_review` instead of being guessed.
|
|
6
|
+
|
|
7
|
+
An optional AI review can add advice for those broad questions. You choose
|
|
8
|
+
Codex or Claude Code. The AI result is extra information; it cannot change the
|
|
9
|
+
scanner's real pass, fail, blocked, or review state, and it never fixes files.
|
|
10
|
+
|
|
11
|
+
## Before you start
|
|
12
|
+
|
|
13
|
+
Install one supported command-line tool:
|
|
14
|
+
|
|
15
|
+
- `codex` for Codex; or
|
|
16
|
+
- `claude` for Claude Code.
|
|
17
|
+
|
|
18
|
+
Sign in once through the scanner. This launches the provider's official login flow but
|
|
19
|
+
stores its credentials in a private scanner-only directory:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
prc login codex
|
|
23
|
+
# or: prc login claude
|
|
24
|
+
|
|
25
|
+
prc auth
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The scanner does not reuse the provider's normal user configuration, sessions,
|
|
29
|
+
instructions, plugins, hooks, or MCP servers. A scan uses the scanner-only login
|
|
30
|
+
with a fresh temporary home and a small runtime environment allowlist. Use
|
|
31
|
+
`prc logout codex` or `prc logout claude` to remove the saved scanner login.
|
|
32
|
+
|
|
33
|
+
Supported API-key environment variables remain an alternative: Codex accepts
|
|
34
|
+
`OPENAI_API_KEY` or `CODEX_API_KEY`; Claude accepts `ANTHROPIC_API_KEY`,
|
|
35
|
+
`ANTHROPIC_AUTH_TOKEN`, or `CLAUDE_CODE_OAUTH_TOKEN`. Only the selected
|
|
36
|
+
credential is forwarded. Remove a temporary variable from the shell after use.
|
|
37
|
+
|
|
38
|
+
AI review can send source excerpts to a remote model and can cost money. Read
|
|
39
|
+
the provider's data and billing rules first. The short `--ai` option is explicit
|
|
40
|
+
permission for screened source processing. The advanced form requires the
|
|
41
|
+
separate `--allow-remote-source-processing` switch.
|
|
42
|
+
|
|
43
|
+
## Try one control first
|
|
44
|
+
|
|
45
|
+
The shortest full-review command is:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
prc full codex
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use `prc full claude` for Claude Code. `prc scan --ai codex|claude` remains an
|
|
52
|
+
equivalent advanced-friendly spelling. To test only one control first, use the
|
|
53
|
+
advanced form:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
prc scan /path/to/project \
|
|
57
|
+
--review-provider codex \
|
|
58
|
+
--review-control PRC-02-001 \
|
|
59
|
+
--allow-remote-source-processing
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
For Claude Code, replace the provider name:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
prc scan /path/to/project \
|
|
66
|
+
--review-provider claude \
|
|
67
|
+
--review-control PRC-02-001 \
|
|
68
|
+
--allow-remote-source-processing
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Open the `Detailed report:` path printed at the end. Find `PRC-02-001`. Its
|
|
72
|
+
normal scanner state is still present. The AI section separately shows:
|
|
73
|
+
|
|
74
|
+
- its suggested result;
|
|
75
|
+
- whether it thinks the rule applies;
|
|
76
|
+
- confidence;
|
|
77
|
+
- reason and advice;
|
|
78
|
+
- exact excerpt lines it used;
|
|
79
|
+
- separate citation-location and claim verification states; and
|
|
80
|
+
- what it could not prove.
|
|
81
|
+
|
|
82
|
+
`snapshot_location_validated` means the path and line existed in the exact
|
|
83
|
+
screened snapshot bound to the task. It does not mean the line supports the AI
|
|
84
|
+
sentence. The claim therefore remains `advisory_unverified` until an independent
|
|
85
|
+
typed verifier or a qualified person proves it.
|
|
86
|
+
|
|
87
|
+
## Review all 10,042 controls
|
|
88
|
+
|
|
89
|
+
The short commands review all active controls:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
prc full codex
|
|
93
|
+
prc full claude
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Use the advanced form only when changing defaults, for example Codex `xhigh`
|
|
97
|
+
effort:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
prc scan /path/to/project \
|
|
101
|
+
--review-provider codex \
|
|
102
|
+
--review-effort xhigh \
|
|
103
|
+
--allow-remote-source-processing
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This is deliberately slow and expensive. The scanner makes batches of at most
|
|
107
|
+
eight controls. For each batch, it tells the top AI process to create exactly
|
|
108
|
+
one separate subagent per control, wait for all of them, and return exactly one
|
|
109
|
+
result per control. With 10,042 active controls and the default batch size,
|
|
110
|
+
expect about 1,256 provider calls and 10,042 subagent reviews. The exact token
|
|
111
|
+
and money cost depends on the chosen provider and model.
|
|
112
|
+
|
|
113
|
+
The scanner can require this orchestration in the sealed task and verify that
|
|
114
|
+
one final result returns for every control. Current provider output does not
|
|
115
|
+
offer trustworthy proof of each internal subagent call, so the scanner does not
|
|
116
|
+
treat claimed orchestration as evidence. A provider that skips a requested
|
|
117
|
+
subagent can at most produce untrusted advisory text, never a verified Pass.
|
|
118
|
+
|
|
119
|
+
Completed batches are stored privately outside the target project. If a later
|
|
120
|
+
batch fails or the run is stopped, run the same command again. Matching finished
|
|
121
|
+
batches are checked and reused. The report is written only after every requested
|
|
122
|
+
batch has a valid result.
|
|
123
|
+
|
|
124
|
+
## What is sent to the provider
|
|
125
|
+
|
|
126
|
+
The scanner first creates a temporary, private copy of selected text files. It:
|
|
127
|
+
|
|
128
|
+
- uses the exact files and hashes from the local inventory;
|
|
129
|
+
- does not follow symlinks;
|
|
130
|
+
- skips `.env`, `.npmrc`, credentials, private-key files, AI instruction files,
|
|
131
|
+
and similar sensitive names;
|
|
132
|
+
- rejects known high-confidence token and private-key shapes before any provider
|
|
133
|
+
starts;
|
|
134
|
+
- skips binary and invalid text;
|
|
135
|
+
- limits each copied file, the total copy, path list, excerpt size, file count,
|
|
136
|
+
and provider output size; and
|
|
137
|
+
- removes the temporary copy at the end.
|
|
138
|
+
|
|
139
|
+
The provider gets a sealed JSON task containing control text, deterministic
|
|
140
|
+
check context, repository paths, and selected excerpts. Repository text is
|
|
141
|
+
marked as untrusted data. A file that says “ignore the scanner” is not treated
|
|
142
|
+
as an instruction.
|
|
143
|
+
|
|
144
|
+
The scanner never gives the provider the source workspace path. For Codex it
|
|
145
|
+
disables shell, web search, apps, browser, computer use, MCP servers, and project
|
|
146
|
+
rules, uses a read-only sandbox, and allows only subagent coordination. For
|
|
147
|
+
Claude Code it allows only the `Agent` tool and blocks Bash, Read, Glob, Grep,
|
|
148
|
+
Write, Edit, web tools, and questions. Provider output must match a strict JSON
|
|
149
|
+
schema, the sealed task ID, every requested control in order, safe evidence
|
|
150
|
+
paths and real line numbers, and fixed size limits.
|
|
151
|
+
|
|
152
|
+
This screen is a safety layer, not a complete secret scanner. Do not opt in with
|
|
153
|
+
source that you are not allowed to send to the selected provider.
|
|
154
|
+
|
|
155
|
+
The scanner stops if it can see local Claude managed settings because those can
|
|
156
|
+
force hooks, plugins, or MCP policy that an ordinary setting cannot override.
|
|
157
|
+
It cannot inspect every policy delivered by a provider's server. The provider
|
|
158
|
+
binary and remote service therefore remain trusted dependencies even though
|
|
159
|
+
they receive no target path or general-purpose workspace tools.
|
|
160
|
+
|
|
161
|
+
## Result meanings
|
|
162
|
+
|
|
163
|
+
AI review uses candidate words on purpose:
|
|
164
|
+
|
|
165
|
+
| AI value | Simple meaning |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| `advisory_pass_candidate` | The shown excerpts look consistent with the rule, but this is not a verified Pass. |
|
|
168
|
+
| `advisory_fail_candidate` | The shown excerpts suggest a problem worth fixing or checking. |
|
|
169
|
+
| `needs_evidence` | Source excerpts cannot prove the rule. Runtime, production, legal, company, or human proof may be needed. |
|
|
170
|
+
| `not_applicable_candidate` | The AI thinks the trigger is absent. A trusted check or person must still make the final decision. |
|
|
171
|
+
|
|
172
|
+
Folder structure is a good example. The AI may explain that a surprising layout
|
|
173
|
+
makes ownership or navigation unclear, but it must not require universal names
|
|
174
|
+
such as `src`, `components`, or `services`. Advice must fit the project's real
|
|
175
|
+
language, build system, size, boundaries, and conventions.
|
|
176
|
+
|
|
177
|
+
## Useful controls
|
|
178
|
+
|
|
179
|
+
| Option | Default | Meaning |
|
|
180
|
+
| --- | ---: | --- |
|
|
181
|
+
| `--ai` | off | Short form: choose `codex` or `claude` and explicitly allow screened remote processing. |
|
|
182
|
+
| `--review-provider` | `none` | Choose `codex` or `claude`. No AI starts by default. |
|
|
183
|
+
| `--review-control ID` | all active | Review one named control; repeat for a small test set. |
|
|
184
|
+
| `--review-batch-size` | `8` | Provider calls contain 1–8 controls; every control still gets its own subagent. |
|
|
185
|
+
| `--review-workers` | `1` | Run 1–4 provider calls at once. One is safer for cost and rate limits. |
|
|
186
|
+
| `--review-timeout` | `30m` | Limit for each resumable batch. |
|
|
187
|
+
| `--review-effort` | `high` | Codex supports `high` or `xhigh`; Claude uses `high`. |
|
|
188
|
+
| `--review-model` | provider default | Pin a provider model when needed. |
|
|
189
|
+
| `--review-state-dir` | user cache | Choose a private resume directory outside the target. |
|
|
190
|
+
| `--review-max-cost-usd` | no limit | Claude-only cost limit for each batch. Codex does not expose the same hard CLI limit. |
|
|
191
|
+
|
|
192
|
+
More workers can finish sooner but increase simultaneous cost and the chance of
|
|
193
|
+
provider rate limits. More controls per call reduce top-level calls but make the
|
|
194
|
+
coordinator's job larger. The defaults favor correctness and easy resuming.
|
|
195
|
+
|
|
196
|
+
## What stops the run
|
|
197
|
+
|
|
198
|
+
The run stops with an execution error if:
|
|
199
|
+
|
|
200
|
+
- a secret-like value is found before remote review;
|
|
201
|
+
- the provider is missing, changes during the run, times out, or exits badly;
|
|
202
|
+
- the schema changes during the run;
|
|
203
|
+
- output is too large, malformed, incomplete, reordered, duplicated, or cites
|
|
204
|
+
a path or line outside the screened copy; or
|
|
205
|
+
- a saved batch does not match its sealed task.
|
|
206
|
+
|
|
207
|
+
Valid completed batches remain saved. No target file is changed, and no partial
|
|
208
|
+
AI result is allowed to make a scanner rule pass.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Scanner benchmarks and quality budgets
|
|
2
|
+
|
|
3
|
+
The benchmark runner measures scanner behavior on small, labeled fixture
|
|
4
|
+
repositories. It is a release-regression tool, not a readiness score and not a
|
|
5
|
+
claim that an assertion is accurate outside the represented fixture classes.
|
|
6
|
+
|
|
7
|
+
The checked-in `core-native` suite currently covers deterministic examples of:
|
|
8
|
+
|
|
9
|
+
- Pass and Fail results;
|
|
10
|
+
- Not Applicable planning;
|
|
11
|
+
- Blocked adapter evidence;
|
|
12
|
+
- Manual Review evidence requirements; and
|
|
13
|
+
- malformed-input execution errors.
|
|
14
|
+
|
|
15
|
+
Each case binds its target inventory digest and is scanned twice at one fixed
|
|
16
|
+
evaluation time. The report fails its quality gate if expected assessment or
|
|
17
|
+
execution states drift, repeated runs differ, precision or recall falls below
|
|
18
|
+
the suite budget, or the false-positive rate exceeds it. The content-addressed
|
|
19
|
+
corpus digest combines the normalized suite definition with every fixture
|
|
20
|
+
inventory digest.
|
|
21
|
+
|
|
22
|
+
Run the suite locally:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
prc benchmark run \
|
|
26
|
+
--catalog-root . \
|
|
27
|
+
--suite fixtures/benchmarks/core-native/suite.yaml \
|
|
28
|
+
--format human
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Emit the versioned report used by CI:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
prc benchmark run \
|
|
35
|
+
--catalog-root . \
|
|
36
|
+
--suite fixtures/benchmarks/core-native/suite.yaml \
|
|
37
|
+
--evaluated-at 2026-08-23T12:00:00Z \
|
|
38
|
+
--format json > benchmark-report.json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`--evaluated-at` makes the evidence timestamps and run identities reproducible
|
|
42
|
+
for a controlled comparison. It does not override target content, catalog, or
|
|
43
|
+
fixture identity.
|
|
44
|
+
|
|
45
|
+
## Interpreting the metrics
|
|
46
|
+
|
|
47
|
+
For benchmark metrics, an expected `fail` is the positive class. Precision is
|
|
48
|
+
the fraction of reported failures that were labeled failures; recall is the
|
|
49
|
+
fraction of labeled failures detected; the false-positive rate is measured
|
|
50
|
+
against all labeled non-failure outcomes. Exact-state matching remains stricter
|
|
51
|
+
than the binary metrics: confusing Blocked, Error, Manual Review, Not
|
|
52
|
+
Applicable, or Pass still fails the suite even when it does not change the
|
|
53
|
+
failure-class confusion matrix.
|
|
54
|
+
|
|
55
|
+
The initial suite is deliberately small. Its perfect budget protects known
|
|
56
|
+
behavior but does not establish broad real-world accuracy. New assertions need
|
|
57
|
+
representative Pass, Fail, unsupported or Not Applicable, and execution-error
|
|
58
|
+
fixtures before they can support a default release gate. Cross-platform,
|
|
59
|
+
adversarial, performance, and tool-update differential suites remain required
|
|
60
|
+
as coverage grows.
|
|
61
|
+
|
|
62
|
+
## Validated packs
|
|
63
|
+
|
|
64
|
+
A pack is a versioned distribution claim over a measured subset of the
|
|
65
|
+
catalog. The `core-foundation` pack binds each included assertion to its exact
|
|
66
|
+
catalog implementation and declares only the outcomes present in the pinned
|
|
67
|
+
benchmark suite. Validation fails on catalog drift, suite digest drift,
|
|
68
|
+
undeclared profile membership, or overstated outcome coverage:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
prc pack validate \
|
|
72
|
+
--catalog-root . \
|
|
73
|
+
--file packs/core-foundation.yaml \
|
|
74
|
+
--format human
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The smaller `core-foundation` pack contains three assertions and remains a
|
|
78
|
+
fast contract test. The `core-native` pack binds all 40 assertions in the core
|
|
79
|
+
profile to a 31-case, 139-expectation fixture corpus:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
prc benchmark run \
|
|
83
|
+
--catalog-root . \
|
|
84
|
+
--suite fixtures/benchmarks/core-native/suite-comprehensive.yaml \
|
|
85
|
+
--evaluated-at 2026-08-23T12:00:00Z
|
|
86
|
+
prc pack validate \
|
|
87
|
+
--catalog-root . \
|
|
88
|
+
--file packs/core-native.yaml
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The v0.2 benchmark contract can materialize five bounded fixture conditions in
|
|
92
|
+
a temporary copy: exact text-token replacement, final-newline removal, file
|
|
93
|
+
truncation, permission-mode changes, and a synthetic immutable Git HEAD. It
|
|
94
|
+
never executes target code, follows symlinks, or modifies the checked-in
|
|
95
|
+
fixture. This gives each deterministic native assertion both its relevant
|
|
96
|
+
positive and negative outcome; manual and adapter-backed assertions remain
|
|
97
|
+
measured only in their fail-closed states. All limitations are part of the pack
|
|
98
|
+
manifest and therefore its digest.
|
|
99
|
+
|
|
100
|
+
Intentionally unsafe container, Terraform, Kubernetes, Go, private-key, merge
|
|
101
|
+
conflict, file-mode, and malformed-source states exist only in materialized
|
|
102
|
+
temporary copies. Their checked-in templates are valid and non-violating. A
|
|
103
|
+
regression test scans the complete source fixture tree and rejects a negative
|
|
104
|
+
fixture that would pollute a real scan of this repository.
|
|
105
|
+
|
|
106
|
+
Pack membership does not authorize adapter execution and does not change gate
|
|
107
|
+
semantics. Detached, scoped Ed25519 verification is supported through an
|
|
108
|
+
explicit [publisher trust store](../architecture/publisher-trust.md). The
|
|
109
|
+
repository does not yet publish an official release trust store or signed pack,
|
|
110
|
+
so checked-in packs remain local integrity contracts rather than a remote trust
|
|
111
|
+
channel.
|
|
112
|
+
|
|
113
|
+
## Adapter release fixtures
|
|
114
|
+
|
|
115
|
+
Repository benchmarks measure assertion decisions over project inventories.
|
|
116
|
+
Recorded adapter fixtures instead measure the untrusted-tool boundary: parser
|
|
117
|
+
limits, protocol rejection, manifest-declared output kinds, incomplete statuses,
|
|
118
|
+
and determinism. Run the separate gate with `prc adapter fixture-validate`.
|
|
119
|
+
Passing it is necessary for an adapter release but never substitutes for a
|
|
120
|
+
tool-specific detection benchmark. See the
|
|
121
|
+
[sandboxed adapter protocol](../architecture/adapters.md#inspect-and-validate)
|
|
122
|
+
for the exact contract and limitations.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# CLI and exit-code contract
|
|
2
|
+
|
|
3
|
+
The scanner uses one stable process exit-code table across commands. Automation
|
|
4
|
+
must inspect both the exit code and the versioned report; it must never interpret
|
|
5
|
+
“a process ran” as “the profile passed.”
|
|
6
|
+
|
|
7
|
+
| Code | Meaning |
|
|
8
|
+
| ---: | --- |
|
|
9
|
+
| `0` | The command completed and the selected gate passed. |
|
|
10
|
+
| `1` | An active assessment gate failed (`no_go`). |
|
|
11
|
+
| `2` | The assessment or requested environment check is incomplete or blocked. |
|
|
12
|
+
| `3` | CLI input, project configuration, catalog, target, or state-location configuration is invalid. |
|
|
13
|
+
| `4` | An adapter, provider, or execution protocol failed. |
|
|
14
|
+
| `5` | Policy denied the requested operation or stopped it at a capability/change budget. |
|
|
15
|
+
| `6` | An internal invariant, canonical-state operation, serialization, or output operation failed. |
|
|
16
|
+
| `7` | The operation was cancelled. |
|
|
17
|
+
| `8` | A candidate patch was produced but failed independent acceptance. |
|
|
18
|
+
|
|
19
|
+
Codes are never borrowed directly from a child tool. An adapter maps its own
|
|
20
|
+
process behavior into the scanner protocol; the scanner then decides whether
|
|
21
|
+
the tool completed, found something, was partial, was unsupported, or failed.
|
|
22
|
+
Requesting a live adapter without the explicit `--mode verify-local` capability
|
|
23
|
+
grant returns `5` before the adapter runtime is resolved or invoked.
|
|
24
|
+
Registry revocation, lifecycle, and trust-policy denials also return `5` before
|
|
25
|
+
the runtime is selected. A malformed registry is a configuration failure.
|
|
26
|
+
|
|
27
|
+
Errors are written to stderr with their stable class, for example:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
error [PRC-EXIT-5]: adapter ... is not authorized by an applicable assertion
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Machine-readable reports remain on stdout. A completed assessment that does not
|
|
34
|
+
pass is still a valid report and normally has no stderr error.
|
|
35
|
+
|
|
36
|
+
`prc version` emits a human-readable build identity. `prc version --format json`
|
|
37
|
+
emits `prc.version/v0.1`, including the semantic scanner version, exact source
|
|
38
|
+
revision, reproducible source timestamp, and Go toolchain. Development builds
|
|
39
|
+
report `unknown` for identity fields that were not injected by the release
|
|
40
|
+
builder; consumers must not treat that as release provenance.
|
|
41
|
+
|
|
42
|
+
`adapter fixture-validate` also uses `1` when its versioned fixture report is
|
|
43
|
+
valid but one or more recorded expectations or determinism checks fail. Invalid
|
|
44
|
+
suite structure, unsafe paths, manifest digest drift, or an attempted limit
|
|
45
|
+
increase use `3`; the command never executes the adapter.
|
|
46
|
+
|
|
47
|
+
## Scan policy
|
|
48
|
+
|
|
49
|
+
`prc scan` inspects the current directory; `prc scan /path/to/project` inspects
|
|
50
|
+
one explicit project. Scan options may appear before or after that path. The
|
|
51
|
+
equivalent advanced `--target` flag remains available, but it cannot be combined
|
|
52
|
+
with the positional project path.
|
|
53
|
+
|
|
54
|
+
`prc quick` selects the 18-assertion `prc/quick` local profile. `prc scan`
|
|
55
|
+
selects the 40-assertion core local profile. `prc full codex` and
|
|
56
|
+
`prc full claude` select the core profile plus advisory AI review of every
|
|
57
|
+
active control. `quick` rejects AI-provider flags, and both aliases reject a
|
|
58
|
+
profile override so their meaning cannot be silently changed. Every mode still
|
|
59
|
+
includes all 10,042 controls in the complete report.
|
|
60
|
+
|
|
61
|
+
Human output creates one detailed standalone HTML report by default. The file is
|
|
62
|
+
created privately outside the target, its absolute path is printed, and an
|
|
63
|
+
existing file is never overwritten. `--report PATH` chooses a new file;
|
|
64
|
+
`--no-report` disables the automatic report. JSON, Markdown, HTML, SARIF, and
|
|
65
|
+
JUnit stdout formats do not create an extra report unless `--report` is also
|
|
66
|
+
given. Report creation is output generation, not remediation: `scan` never
|
|
67
|
+
invokes `fix`, `remediate`, or a write-capable target process.
|
|
68
|
+
|
|
69
|
+
Human output uses `--color auto` by default. `--color always` and
|
|
70
|
+
`--color never` are explicit alternatives. A nonempty `NO_COLOR` environment
|
|
71
|
+
variable and `TERM=dumb` disable color. Color is never the only meaning: every
|
|
72
|
+
line keeps a symbol and a Pass, Fail, Blocked, Manual, N/A, or Error word.
|
|
73
|
+
Machine formats reject the human-only `--color` option and never contain ANSI
|
|
74
|
+
bytes. Untrusted paths and messages are escaped to one printable line before
|
|
75
|
+
terminal rendering.
|
|
76
|
+
|
|
77
|
+
Every complete scan includes all 10,042 registered controls. Broad controls
|
|
78
|
+
without complete proof remain `needs_review`; narrow passing assertions produce
|
|
79
|
+
only `partially_verified`. `prc full codex|claude` and the equivalent
|
|
80
|
+
`--ai codex|claude` form acknowledge screened remote source processing. The advanced form uses
|
|
81
|
+
`--review-provider` plus `--allow-remote-source-processing`. Those providers add
|
|
82
|
+
strict-schema advisory candidates and cannot change the authoritative
|
|
83
|
+
disposition. Cited paths and lines are snapshot-location validated, while the
|
|
84
|
+
AI claims remain explicitly `advisory_unverified`. Provider launch,
|
|
85
|
+
timeout, secret-screening, or protocol failures return `4`. See
|
|
86
|
+
[safe AI control review](ai-control-review.md).
|
|
87
|
+
|
|
88
|
+
The default `--exit-policy profile` maps `profile_satisfied` to `0`, `no_go` to
|
|
89
|
+
`1`, and incomplete, blocked, or manual-evidence states to `2`. A policy or
|
|
90
|
+
budget terminal state maps to `5`.
|
|
91
|
+
|
|
92
|
+
`--exit-policy no-go` does not convert incomplete evidence, blocked execution,
|
|
93
|
+
or scanner errors into success. It is retained for gate-policy compatibility as
|
|
94
|
+
profiles gain more non-no-go completed-failure states.
|
|
95
|
+
|
|
96
|
+
`--exit-policy never` is an explicit report-generation override: after a scan
|
|
97
|
+
has completed and emitted its canonical result it returns `0` regardless of the
|
|
98
|
+
terminal assessment state. It does not alter that state, rewrite a finding, or
|
|
99
|
+
hide a pre-report configuration, adapter, policy, cancellation, or internal
|
|
100
|
+
error. Do not use `never` as a release gate.
|
|
101
|
+
|
|
102
|
+
## Remediation policy
|
|
103
|
+
|
|
104
|
+
One-shot `remediate` and `remediate-proposal` commands return `0` only for an
|
|
105
|
+
accepted candidate and `8` for a fully reported but rejected candidate. A
|
|
106
|
+
request that exceeds an allowed remediation class, protected-path rule, or
|
|
107
|
+
configured capability budget returns `5`.
|
|
108
|
+
|
|
109
|
+
The `fix` loop returns `0` only for `profile_satisfied`, `8` when candidate
|
|
110
|
+
acceptance stops the loop, and `5` when policy or budget stops it. A configured
|
|
111
|
+
provider launch, timeout, or protocol failure is recorded as `provider_failed`
|
|
112
|
+
and returns `4`; a valid provider
|
|
113
|
+
`unable` or `needs_escalation` response is recorded as `provider_stopped` and
|
|
114
|
+
returns `2`. Explicit caller cancellation remains code `7` even though its
|
|
115
|
+
failure evidence is preserved. Otherwise the embedded assessment gate maps through the scan table,
|
|
116
|
+
so machine work ending with manual or unavailable evidence is `2`, not a
|
|
117
|
+
production-readiness claim.
|
|
118
|
+
|
|
119
|
+
`doctor` returns `2` when a requested required capability is unavailable. Its
|
|
120
|
+
JSON report still distinguishes each passing, warning, and failing probe.
|
|
121
|
+
|
|
122
|
+
## MCP stdio process
|
|
123
|
+
|
|
124
|
+
`mcp serve` returns `0` after a clean stdin close. Invalid locked paths,
|
|
125
|
+
configuration, catalog, or profile fail startup with `3`; an unreadable or
|
|
126
|
+
oversized stdio transport message terminates with `4`. Individual valid
|
|
127
|
+
JSON-RPC protocol and tool errors are returned on stdout using MCP error
|
|
128
|
+
objects, so the process can continue serving later messages without converting
|
|
129
|
+
an error into a readiness result. See the
|
|
130
|
+
[read-only MCP agent integration](mcp-agent-integration.md).
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Declared project configuration
|
|
2
|
+
|
|
3
|
+
Repository discovery cannot safely infer release scope, risk, deployed features,
|
|
4
|
+
data classes, or execution authority. `production-readiness.yaml` is the
|
|
5
|
+
versioned declaration for those facts and for the scanner's local capability
|
|
6
|
+
budget.
|
|
7
|
+
|
|
8
|
+
The current `prc.config/v0.1` contract is deliberately restrictive. Inventory,
|
|
9
|
+
plan, and scan commands accept it through `--config`. The scanner binds its
|
|
10
|
+
canonical digest and declarations into the inventory and plan identity.
|
|
11
|
+
Declaring a feature or environment is applicability context, not proof that the
|
|
12
|
+
feature is deployed or behaves correctly.
|
|
13
|
+
|
|
14
|
+
## Validate a configuration
|
|
15
|
+
|
|
16
|
+
Start from the checked-in
|
|
17
|
+
[`fixtures/config/production-readiness.yaml`](https://github.com/MarinJursic/production-readiness-checklist/blob/main/fixtures/config/production-readiness.yaml)
|
|
18
|
+
example, then run:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
prc config validate --file production-readiness.yaml
|
|
22
|
+
prc config validate --file production-readiness.yaml --format json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The JSON output includes a SHA-256 digest over the canonical decoded document.
|
|
26
|
+
Mapping-key order does not change the digest. Security-relevant lists must be
|
|
27
|
+
sorted and duplicate-free so equivalent inputs have one representation.
|
|
28
|
+
|
|
29
|
+
## Scope declarations
|
|
30
|
+
|
|
31
|
+
The document records:
|
|
32
|
+
|
|
33
|
+
- stable project identity and risk profile;
|
|
34
|
+
- selected scanner profile, exact source revision, artifact digests, and target
|
|
35
|
+
environments;
|
|
36
|
+
- included component roots and reviewed exclusions with rationales;
|
|
37
|
+
- feature flags that discovery cannot establish safely;
|
|
38
|
+
- data classifications, regulatory-context tags, and evidence classes that must
|
|
39
|
+
never be retained; and
|
|
40
|
+
- execution and remediation budgets.
|
|
41
|
+
|
|
42
|
+
Paths are repository-relative, normalized slash paths. Absolute paths,
|
|
43
|
+
backslashes, traversal, duplicate paths, and unsorted declarations are rejected.
|
|
44
|
+
Excluding a component does not delete it or cause the inventory walker to ignore
|
|
45
|
+
it in v0.1. A configuration inside the target must match the exact regular file
|
|
46
|
+
captured by inventory. An external configuration is also reopened and compared
|
|
47
|
+
by both raw-source and canonical digests. A change after validation fails the
|
|
48
|
+
run in either case.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
prc inventory --target . --config production-readiness.yaml --format json
|
|
52
|
+
prc plan --target . --catalog-root . --config production-readiness.yaml
|
|
53
|
+
prc scan --target . --catalog-root . --config production-readiness.yaml
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
When `--profile` is omitted, plan and scan use the configured profile. An
|
|
57
|
+
explicitly selected profile must match it. Declared components are additive;
|
|
58
|
+
they do not erase discovered components or facts.
|
|
59
|
+
|
|
60
|
+
`source_ref` must be empty or a lowercase 40–64 character hexadecimal revision.
|
|
61
|
+
When supplied, it must equal the Git revision inventoried from the target; an
|
|
62
|
+
unresolved variable, branch name, missing Git identity, or mismatch fails closed.
|
|
63
|
+
Git metadata is read only when its directory and references remain inside the
|
|
64
|
+
target root. A symlinked `.git` entry or a linked-worktree `gitdir` outside the
|
|
65
|
+
target is not followed, so that target has no inferred Git identity and cannot
|
|
66
|
+
satisfy a nonempty `source_ref`.
|
|
67
|
+
|
|
68
|
+
## Capability boundary
|
|
69
|
+
|
|
70
|
+
Configuration v0.1 accepts only deny-by-default capabilities and bounded resource
|
|
71
|
+
declarations:
|
|
72
|
+
|
|
73
|
+
- `network: deny`;
|
|
74
|
+
- an empty `allow_commands` list;
|
|
75
|
+
- `production_connected: false`;
|
|
76
|
+
- bounded parallelism and duration declarations;
|
|
77
|
+
- bounded remediation attempts, files, and changed lines; and
|
|
78
|
+
- a nonempty protected-path list.
|
|
79
|
+
|
|
80
|
+
A request for network access, target commands, or production connectivity fails
|
|
81
|
+
validation instead of being accepted and ignored. Future configuration versions
|
|
82
|
+
may add capabilities only together with an enforceable runner and threat-model
|
|
83
|
+
update.
|
|
84
|
+
|
|
85
|
+
The native scanner currently evaluates serially, so it remains below
|
|
86
|
+
`max_parallel`. `max_duration_seconds` is enforced for configured live adapter
|
|
87
|
+
execution and as the total `fix` loop deadline, including provider and verifier
|
|
88
|
+
child processes. Native file discovery uses fixed internal size and traversal
|
|
89
|
+
limits but is not yet interrupted by this setting. `remediate`,
|
|
90
|
+
`remediate-proposal`, and `provider seal-task` also accept `--config`.
|
|
91
|
+
Remediation must be enabled; configured duration, file, line, and attempt
|
|
92
|
+
ceilings cannot be raised by command-line flags; configured protected paths and
|
|
93
|
+
an in-target configuration source are always added to the immutable guard set.
|
|
94
|
+
|
|
95
|
+
## Parser and file safety
|
|
96
|
+
|
|
97
|
+
The loader accepts one regular YAML file no larger than 1 MiB. It rejects
|
|
98
|
+
symlinks, missing or unknown fields, duplicate keys, null values, YAML aliases,
|
|
99
|
+
multiple YAML documents, unsafe paths, unsupported enum values, capability
|
|
100
|
+
expansion, and out-of-range budgets. The JSON Schema and Go semantic validator
|
|
101
|
+
are both exercised in CI.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Control contracts
|
|
2
|
+
|
|
3
|
+
The checklist contains broad objectives. A broad objective is not automatically
|
|
4
|
+
an executable test. `catalog/control-contracts.json` gives every registered
|
|
5
|
+
control a compact machine-readable triage contract without pretending that a
|
|
6
|
+
generated classification is an expert-approved acceptance test.
|
|
7
|
+
|
|
8
|
+
Every contract records:
|
|
9
|
+
|
|
10
|
+
- whether repository, environment, human, or mixed evidence is expected;
|
|
11
|
+
- whether deterministic checking or AI advice may be useful;
|
|
12
|
+
- whether the wording appears compound, conditional, negative, absolute, or
|
|
13
|
+
dependent on a project-specific threshold;
|
|
14
|
+
- the evidence authority that a future assertion may require;
|
|
15
|
+
- the proof needed before Not Applicable may be proposed; and
|
|
16
|
+
- whether the contract is generated and unreviewed or expert reviewed.
|
|
17
|
+
|
|
18
|
+
Exact duplicate statements keep separate stable IDs but point to one canonical
|
|
19
|
+
control ID. This is an alias, not permission to silently merge controls with
|
|
20
|
+
different scope or meaning.
|
|
21
|
+
|
|
22
|
+
Generated contracts are routing and review data only. They cannot produce a
|
|
23
|
+
Pass. Before a contract becomes executable, a control owner must split compound
|
|
24
|
+
promises, define measurable applicability and evidence, approve technology-
|
|
25
|
+
neutral acceptance criteria, and add positive, negative, Not Applicable,
|
|
26
|
+
unusual-layout, and adversarial fixtures.
|
|
27
|
+
|
|
28
|
+
Every `prc.run/v0.12` complete scan binds the SHA-256 of this whole contract
|
|
29
|
+
document and the individual contract SHA-256 on each of its 10,042 control
|
|
30
|
+
results. A missing, stale, reordered, or edited contract file stops the scan.
|
|
31
|
+
The ordinary local profile still executes only its explicitly registered narrow
|
|
32
|
+
assertions. Optional AI review receives the contract as a routing hint and must
|
|
33
|
+
keep repository, environment, and human evidence authority separate.
|
|
34
|
+
|
|
35
|
+
The generated
|
|
36
|
+
[`research/control-acceptance-criteria/README.md`](https://github.com/MarinJursic/production-readiness-checklist/blob/main/research/control-acceptance-criteria/README.md)
|
|
37
|
+
indexes bounded parts that list proposed acceptance criteria, today's real
|
|
38
|
+
scanner behavior, future check method, and wording warnings for every control.
|
|
39
|
+
It is a review queue, not a claim that 10,042 expert-approved acceptance tests
|
|
40
|
+
already exist.
|
|
41
|
+
|
|
42
|
+
Regenerate and verify the file with:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
python3 scripts/control_contracts.py generate
|
|
46
|
+
python3 scripts/control_contracts.py check
|
|
47
|
+
```
|