@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,85 @@
|
|
|
1
|
+
# Catalog integrity
|
|
2
|
+
|
|
3
|
+
The scanner treats the catalog as executable policy even though catalog files do
|
|
4
|
+
not run code. A malformed objective, assertion, or profile can otherwise change
|
|
5
|
+
what is assessed, what counts as evidence, or which result blocks a release.
|
|
6
|
+
Catalog loading therefore fails closed before inventory planning begins.
|
|
7
|
+
|
|
8
|
+
## Runtime loading contract
|
|
9
|
+
|
|
10
|
+
The Go scanner accepts only one bounded YAML document per regular catalog file.
|
|
11
|
+
Files larger than 4 MiB, symbolic links, unknown fields, trailing YAML documents,
|
|
12
|
+
unsupported schema versions, and mixed catalog versions are rejected. The
|
|
13
|
+
loader also checks the file identity and size while reading so a concurrent
|
|
14
|
+
replacement cannot silently become policy.
|
|
15
|
+
|
|
16
|
+
Every loaded definition is checked for:
|
|
17
|
+
|
|
18
|
+
- valid and unique objective, assertion, implementation, and profile IDs;
|
|
19
|
+
- positive revisions and supported catalog and profile versions;
|
|
20
|
+
- nonempty bounded UTF-8 text without NUL bytes;
|
|
21
|
+
- allowed automation classes, evidence authorities, severities, gates, and
|
|
22
|
+
remediation classes;
|
|
23
|
+
- unique domains, evidence requirements, control links, profile members, and
|
|
24
|
+
terminal severities;
|
|
25
|
+
- safe repository-relative Markdown source paths and exact source line text;
|
|
26
|
+
- existing, bidirectional objective-to-assertion mappings; and
|
|
27
|
+
- profile references to assertions that are present in the same catalog.
|
|
28
|
+
|
|
29
|
+
Any violation is a CLI input error. The scanner does not partially load a
|
|
30
|
+
catalog, ignore an invalid record, or continue with a weakened profile.
|
|
31
|
+
|
|
32
|
+
## Repository-wide generation checks
|
|
33
|
+
|
|
34
|
+
Runtime validation protects scanner consumers. The repository's Python catalog
|
|
35
|
+
check additionally rebuilds and compares the complete 10,042-control registry,
|
|
36
|
+
verifies source digests and revisions, validates every JSON Schema, and checks
|
|
37
|
+
the generated core-profile documentation. Run both the scanner tests and the
|
|
38
|
+
repository check after changing catalog policy:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
go test ./scanner/catalog ./scanner/engine ./cmd/prc
|
|
42
|
+
python3 scripts/catalog.py check
|
|
43
|
+
python3 scripts/validate.py
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The two layers are intentionally complementary. A released scanner must reject
|
|
47
|
+
an unsafe catalog even when repository CI was skipped, while repository CI must
|
|
48
|
+
detect drift across source controls and generated artifacts that a small runtime
|
|
49
|
+
profile does not load.
|
|
50
|
+
|
|
51
|
+
## Reproducible inspection and distribution
|
|
52
|
+
|
|
53
|
+
Validate a catalog and print its path-independent identity before planning a
|
|
54
|
+
scan:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
prc catalog validate --catalog-root /path/to/catalog
|
|
58
|
+
prc catalog validate --catalog-root /path/to/catalog --format json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`prc catalog bundle` emits `prc.catalog-bundle/v0.1` JSON containing the same
|
|
62
|
+
manifest plus every validated objective, assertion, and profile in stable ID
|
|
63
|
+
order:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
prc catalog bundle --catalog-root /path/to/catalog > catalog-bundle.json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The bundle contains no build timestamp or absolute path, so two copies of the
|
|
70
|
+
same definitions produce identical bytes. Its manifest records the semantic
|
|
71
|
+
catalog version, exact catalog digest, and definition counts. The checked-in
|
|
72
|
+
JSON Schemas validate both the manifest and bundle. Signing and publisher trust
|
|
73
|
+
remain release-pipeline responsibilities; an unsigned bundle is not evidence of
|
|
74
|
+
who published it.
|
|
75
|
+
|
|
76
|
+
## Identity binding
|
|
77
|
+
|
|
78
|
+
A successful load produces a deterministic digest over every parsed objective,
|
|
79
|
+
assertion, profile, and catalog version. The plan records that digest together
|
|
80
|
+
with the exact profile and assertion definitions. A catalog policy change can
|
|
81
|
+
therefore invalidate earlier evidence even when the target repository did not
|
|
82
|
+
change.
|
|
83
|
+
|
|
84
|
+
The filesystem root is excluded from the digest. Identical trusted definitions
|
|
85
|
+
have the same identity when installed at different absolute paths.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Evidence and result model
|
|
2
|
+
|
|
3
|
+
Production readiness is a set of proof obligations, not a count of checked boxes.
|
|
4
|
+
The scanner keeps normative intent, executable assertions, observations, evidence,
|
|
5
|
+
and policy decisions as separate versioned records.
|
|
6
|
+
|
|
7
|
+
## Core records
|
|
8
|
+
|
|
9
|
+
| Record | Purpose |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Control objective | Human-readable outcome and rationale |
|
|
12
|
+
| Assertion | Atomic proof obligation with explicit applicability and evidence requirements |
|
|
13
|
+
| Implementation | Versioned producer and evaluator for an assertion |
|
|
14
|
+
| Observation | Fact reported by a producer before assertion evaluation |
|
|
15
|
+
| Evidence | Immutable bytes or external reference supporting an observation |
|
|
16
|
+
| Assertion result | Applicability, execution, and assessment for one assertion |
|
|
17
|
+
| Finding | Prioritized consequence and remediation eligibility |
|
|
18
|
+
| Gate | Policy decision derived from results |
|
|
19
|
+
| Exception | Scoped, owned, expiring risk acceptance |
|
|
20
|
+
| Fix contract | Authorized change scope and independent acceptance criteria |
|
|
21
|
+
|
|
22
|
+
One control objective can map to multiple assertions. Multiple implementations
|
|
23
|
+
can support an assertion for different ecosystems. An implementation version is
|
|
24
|
+
part of result identity.
|
|
25
|
+
|
|
26
|
+
## Proof obligation
|
|
27
|
+
|
|
28
|
+
An assertion declares before execution:
|
|
29
|
+
|
|
30
|
+
- the property to prove;
|
|
31
|
+
- applicability conditions;
|
|
32
|
+
- acceptable evidence types and minimum authority;
|
|
33
|
+
- target, artifact, release, and environment scope;
|
|
34
|
+
- freshness and invalidation rules;
|
|
35
|
+
- evaluation logic;
|
|
36
|
+
- failure severity and gate behavior;
|
|
37
|
+
- whether human or external evidence is required; and
|
|
38
|
+
- remediation class, if any.
|
|
39
|
+
|
|
40
|
+
`evidence_required` and `evidence_observed` are distinct fields. Missing evidence
|
|
41
|
+
does not prove that a property is absent, and a located file does not prove that
|
|
42
|
+
the file's intended behavior occurred.
|
|
43
|
+
|
|
44
|
+
## Independent result axes
|
|
45
|
+
|
|
46
|
+
Applicability:
|
|
47
|
+
|
|
48
|
+
- `applicable`
|
|
49
|
+
- `not_applicable`
|
|
50
|
+
- `undetermined`
|
|
51
|
+
|
|
52
|
+
Execution:
|
|
53
|
+
|
|
54
|
+
- `not_run`
|
|
55
|
+
- `completed`
|
|
56
|
+
- `blocked`
|
|
57
|
+
- `error`
|
|
58
|
+
|
|
59
|
+
Assessment:
|
|
60
|
+
|
|
61
|
+
- `pass`
|
|
62
|
+
- `fail`
|
|
63
|
+
- `unknown`
|
|
64
|
+
- `manual_review`
|
|
65
|
+
- `stale`
|
|
66
|
+
- `conflicting`
|
|
67
|
+
|
|
68
|
+
This prevents an adapter error, missing evidence, manual decision, and verified
|
|
69
|
+
failure from collapsing into the same label.
|
|
70
|
+
|
|
71
|
+
## Canonical findings and correlation
|
|
72
|
+
|
|
73
|
+
Run result v0.6 emits a `prc.finding/v0.1` record for every failed assertion.
|
|
74
|
+
It does not create findings for missing access, execution errors, manual review,
|
|
75
|
+
unknown applicability, or Not Applicable results; those remain visible on their
|
|
76
|
+
independent assertion-result axes.
|
|
77
|
+
|
|
78
|
+
Each finding records:
|
|
79
|
+
|
|
80
|
+
- a content-addressed ID for the exact inventory, summary, evidence, and policy
|
|
81
|
+
classification;
|
|
82
|
+
- a stable fingerprint over the assertion, logical subject, and normalized
|
|
83
|
+
source locations;
|
|
84
|
+
- the mapped assertion and control IDs;
|
|
85
|
+
- the exact repository or declared-project subject and inventory digest;
|
|
86
|
+
- severity, gate, and remediation class;
|
|
87
|
+
- only validated repository-relative locations; and
|
|
88
|
+
- the complete set of evidence IDs from its failed assertion result.
|
|
89
|
+
|
|
90
|
+
The fingerprint survives new evidence and explanatory wording changes so a
|
|
91
|
+
failure can be correlated across scans. The content ID changes when the exact
|
|
92
|
+
finding envelope changes. A declared project ID supplies stable cross-checkout
|
|
93
|
+
subject identity; without project configuration, correlation is scoped to the
|
|
94
|
+
scanner's repository target name.
|
|
95
|
+
|
|
96
|
+
The state database indexes both identities, normalized locations, and evidence
|
|
97
|
+
links while immutable run JSON remains authoritative. SARIF is derived from
|
|
98
|
+
these canonical findings. It no longer guesses findings or file locations from
|
|
99
|
+
arbitrary evidence source strings.
|
|
100
|
+
|
|
101
|
+
Version-specific `prc.run/v0.1` through `prc.run/v0.8` schemas remain
|
|
102
|
+
available for archived results. Each pins its complete local schema dependency
|
|
103
|
+
graph instead of following mutable aliases.
|
|
104
|
+
|
|
105
|
+
## Evidence envelope
|
|
106
|
+
|
|
107
|
+
Every evidence item records:
|
|
108
|
+
|
|
109
|
+
- schema version and evidence identifier;
|
|
110
|
+
- target, commit, artifact digest, release, and environment as applicable;
|
|
111
|
+
- producer, implementation, tool, and policy versions;
|
|
112
|
+
- collection time, validity interval, and invalidation keys;
|
|
113
|
+
- source authority and collection method;
|
|
114
|
+
- media type, content digest, location, and optional redacted preview;
|
|
115
|
+
- sensitivity, retention, and access classification;
|
|
116
|
+
- scope, limitations, and assumptions;
|
|
117
|
+
- verification method and outcome; and
|
|
118
|
+
- relationships to supporting or contradictory observations.
|
|
119
|
+
|
|
120
|
+
Evidence content is stored by digest. Reports refer to evidence identifiers and
|
|
121
|
+
redacted previews rather than copying sensitive content indiscriminately.
|
|
122
|
+
|
|
123
|
+
The durable state layer keeps immutable JSON as the canonical record and adds a
|
|
124
|
+
transactional SQLite query index for runs, results, evidence metadata, inventory
|
|
125
|
+
files, sourced facts, relationships, and audit events. It verifies canonical
|
|
126
|
+
identities before indexing, uses strict tables and foreign keys, and repairs
|
|
127
|
+
derived rows by re-indexing an immutable run. Indexed record paths are relative
|
|
128
|
+
and must resolve inside the state root. See [durable state and run
|
|
129
|
+
history](../scanner/state-and-history.md).
|
|
130
|
+
|
|
131
|
+
The [diff-aware invalidation model](../scanner/diff-and-invalidation.md) binds
|
|
132
|
+
new plans to exact profile and assertion definitions, maps native
|
|
133
|
+
implementations to their repository inputs, and refuses to carry evidence to a
|
|
134
|
+
different target identity without revalidation.
|
|
135
|
+
|
|
136
|
+
## Authority is assertion-specific
|
|
137
|
+
|
|
138
|
+
Authority is not a universal numeric confidence score. A repository configuration
|
|
139
|
+
may be authoritative for declared configuration syntax while remaining weak
|
|
140
|
+
evidence of what is deployed. A signed production observation may prove deployed
|
|
141
|
+
state without proving recovery or user-visible behavior.
|
|
142
|
+
|
|
143
|
+
The evaluator compares the evidence's authority, scope, identity, and freshness
|
|
144
|
+
to the assertion's declared proof obligation. Model confidence cannot replace
|
|
145
|
+
this comparison.
|
|
146
|
+
|
|
147
|
+
## Exceptions and gates
|
|
148
|
+
|
|
149
|
+
An exception contains an owner, rationale, affected assertion and target scope,
|
|
150
|
+
compensating controls, approval identity, creation time, expiry, and invalidation
|
|
151
|
+
conditions. Expired or out-of-scope exceptions do not suppress findings.
|
|
152
|
+
|
|
153
|
+
Gates consume explicit assertion results and exceptions. They do not consume a
|
|
154
|
+
readiness percentage.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Execution plans and capability policy
|
|
2
|
+
|
|
3
|
+
`prc plan` produces a content-addressed `prc.plan/v0.6` artifact before any
|
|
4
|
+
external adapter can run. The artifact records both what should be evaluated and
|
|
5
|
+
which capabilities the selected execution mode permits.
|
|
6
|
+
|
|
7
|
+
## Dependency graph
|
|
8
|
+
|
|
9
|
+
The `nodes` array is a deterministic topological ordering:
|
|
10
|
+
|
|
11
|
+
1. one inventory node binds the complete target inventory;
|
|
12
|
+
2. zero or more immutable adapter nodes depend on that inventory;
|
|
13
|
+
3. one assertion node per profile assertion depends on the inventory and any
|
|
14
|
+
adapter evidence it requires; and
|
|
15
|
+
4. one gate node depends on every assertion node.
|
|
16
|
+
|
|
17
|
+
Every dependency must name an earlier node. Duplicate IDs, forward references,
|
|
18
|
+
missing assertion nodes, and unavailable implementation IDs fail closed. The
|
|
19
|
+
engine evaluates assertion nodes in this recorded order; it does not reconstruct
|
|
20
|
+
an implicit execution order at scan time.
|
|
21
|
+
|
|
22
|
+
The `implementations` array is a deduplicated registry view. It records the exact
|
|
23
|
+
implementation ID, implementation kind, all assertions that use it, required
|
|
24
|
+
capabilities, and whether the scanner has that exact version available. The
|
|
25
|
+
`adapters` array similarly records immutable adapter IDs and manifest digests,
|
|
26
|
+
observation kinds, capabilities, and plan-time authorization. Runtime and image
|
|
27
|
+
availability are checked separately before launch.
|
|
28
|
+
|
|
29
|
+
## Execution modes
|
|
30
|
+
|
|
31
|
+
The current vertical slice supports two modes:
|
|
32
|
+
|
|
33
|
+
| Mode | Workspace | Scratch | Process | Network | Secrets |
|
|
34
|
+
| --- | --- | --- | --- | --- | --- |
|
|
35
|
+
| `inspect` | Read-only | Denied | Denied | Denied | Denied |
|
|
36
|
+
| `verify-local` | Read-only | Isolated only | Rootless OCI only | Denied | Denied |
|
|
37
|
+
|
|
38
|
+
`inspect` is the default for `plan` and ordinary native scans. A live adapter
|
|
39
|
+
scan requires the operator to pass `--mode verify-local` explicitly. The adapter
|
|
40
|
+
must still be bound by an applicable assertion using its exact ID and manifest
|
|
41
|
+
SHA-256 digest, and its manifest must pass the stricter OCI runner validation.
|
|
42
|
+
Selecting a mode never authorizes an unbound adapter.
|
|
43
|
+
|
|
44
|
+
Unsupported execution modes are configuration errors. An adapter requirement
|
|
45
|
+
that exceeds the selected capability policy produces a blocked plan node and is
|
|
46
|
+
denied before the OCI runtime is invoked. The current modes never grant target
|
|
47
|
+
writes, general subprocess execution, network access, secret handles, production
|
|
48
|
+
access, or external mutation.
|
|
49
|
+
|
|
50
|
+
## Blocked work remains visible
|
|
51
|
+
|
|
52
|
+
A plan is still useful when some nodes are blocked. Examples include an
|
|
53
|
+
unregistered implementation, an applicable analysis assertion without an
|
|
54
|
+
immutable adapter binding, or an adapter that requires a higher mode. The gate
|
|
55
|
+
node is then marked blocked, and a scan records an explicit unknown/blocked
|
|
56
|
+
assertion result. Missing execution never becomes Pass or Not Applicable.
|
|
57
|
+
|
|
58
|
+
Version-specific plan v0.1 through v0.6 and run v0.1 through v0.8 schemas
|
|
59
|
+
remain frozen for archived consumers. Plans before v0.6 do not contain the
|
|
60
|
+
execution DAG or capability policy and therefore require conservative
|
|
61
|
+
re-evaluation when compared with current plans.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Scanner product contract
|
|
2
|
+
|
|
3
|
+
The Production Readiness Checklist is an evidence and policy engine for a declared
|
|
4
|
+
target. It does not claim that a nontrivial system has no defects, certify an
|
|
5
|
+
organization, or make a release decision for an accountable owner.
|
|
6
|
+
|
|
7
|
+
## Verifiable promise
|
|
8
|
+
|
|
9
|
+
Given a declared target, release, readiness profile, evidence scope, policy, and
|
|
10
|
+
capability budget, the scanner will:
|
|
11
|
+
|
|
12
|
+
1. create an immutable plan of applicable and unresolved assertions;
|
|
13
|
+
2. collect observations through versioned, policy-authorized evidence producers;
|
|
14
|
+
3. evaluate each planned assertion without upgrading an inference into a fact;
|
|
15
|
+
4. preserve unknown, blocked, stale, conflicting, and manual-review results;
|
|
16
|
+
5. expose the evidence and reasoning behind every result;
|
|
17
|
+
6. remediate only findings whose fix contract and capability class permit it;
|
|
18
|
+
7. independently verify every candidate change; and
|
|
19
|
+
8. stop in an explicit terminal state.
|
|
20
|
+
|
|
21
|
+
The scanner may say that a profile is satisfied for a particular target and
|
|
22
|
+
evidence set. It must not reduce that scoped result to the unqualified statement
|
|
23
|
+
that a project is "production ready."
|
|
24
|
+
|
|
25
|
+
## Completion states
|
|
26
|
+
|
|
27
|
+
A scan or remediation run ends in exactly one of these states:
|
|
28
|
+
|
|
29
|
+
| State | Meaning |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `profile_satisfied` | Every applicable required assertion in the selected profile has current passing evidence and no gate blocks the result. Advisory findings remain visible without changing this state. |
|
|
32
|
+
| `machine_work_complete_manual_evidence_remaining` | Every policy-eligible automated fix is exhausted, but human or external evidence remains. |
|
|
33
|
+
| `assessment_incomplete` | Required evidence or applicability context is unavailable. |
|
|
34
|
+
| `no_go` | One or more configured blocking gates failed. |
|
|
35
|
+
| `policy_stopped` | A requested action exceeded the run's capability policy. |
|
|
36
|
+
| `budget_exhausted` | The attempt, time, cost, or change budget was reached. |
|
|
37
|
+
| `environment_blocked` | A required tool or evidence source could not be used safely. |
|
|
38
|
+
|
|
39
|
+
No aggregate percentage overrides these states. One no-go result can block a
|
|
40
|
+
release regardless of how many unrelated assertions pass.
|
|
41
|
+
|
|
42
|
+
## Truth ownership
|
|
43
|
+
|
|
44
|
+
The engine owns control selection, evidence verification, assertion evaluation,
|
|
45
|
+
gates, policy, and patch acceptance. Tools and connectors produce observations.
|
|
46
|
+
Coding agents produce untrusted patch candidates and explanations.
|
|
47
|
+
|
|
48
|
+
An agent response, model confidence, filename, README statement, configuration
|
|
49
|
+
file, or source-code comment is not proof of runtime or production behavior.
|
|
50
|
+
Evidence authority is determined by the assertion's proof obligation and the
|
|
51
|
+
environment and artifact to which the evidence applies.
|
|
52
|
+
|
|
53
|
+
## Non-goals
|
|
54
|
+
|
|
55
|
+
The scanner will not:
|
|
56
|
+
|
|
57
|
+
- prove the absence of every defect;
|
|
58
|
+
- infer production state from repository intent alone;
|
|
59
|
+
- treat provenance, an SBOM, a test file, or a policy file as proof that all
|
|
60
|
+
associated behavior is correct;
|
|
61
|
+
- make legal, regulatory, accessibility, safety, risk-acceptance, or release
|
|
62
|
+
decisions for accountable humans;
|
|
63
|
+
- let a target repository, adapter, or agent change scanner policy during a run;
|
|
64
|
+
- deploy from the general remediation loop; or
|
|
65
|
+
- weaken checks, thresholds, tests, baselines, or suppressions to manufacture a
|
|
66
|
+
passing result.
|
|
67
|
+
|
|
68
|
+
## Compatibility promise
|
|
69
|
+
|
|
70
|
+
Catalog, profile, result, evidence, adapter, and provider formats are versioned
|
|
71
|
+
independently. Until a format is declared stable, consumers must pin a supported
|
|
72
|
+
version. Breaking changes require a migration path and explicit release notes.
|
|
73
|
+
|
|
74
|
+
The process interface follows the [stable CLI and exit-code
|
|
75
|
+
contract](../scanner/cli-contract.md); child-tool exit statuses never become
|
|
76
|
+
assessment truth without protocol mapping and engine evaluation.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Offline publisher trust
|
|
2
|
+
|
|
3
|
+
Content digests prove identity, not authorship. The scanner therefore supports
|
|
4
|
+
detached Ed25519 verification for pack, adapter-registry, and signed
|
|
5
|
+
risk-exception artifacts through an operator-selected trust store. It never
|
|
6
|
+
discovers keys, downloads trust metadata, or handles publisher private keys.
|
|
7
|
+
|
|
8
|
+
The trust store is an explicit local root of trust. Each key has an ID, exact
|
|
9
|
+
public key, artifact-kind scopes, validity interval, and active or revoked
|
|
10
|
+
status. Revocation is fail-closed and applies even to a signature created
|
|
11
|
+
before the key was revoked. A key authorized for a pack cannot sign an adapter
|
|
12
|
+
registry or risk exception unless that additional scope is also present.
|
|
13
|
+
|
|
14
|
+
The detached signature covers a domain-separated canonical payload containing:
|
|
15
|
+
|
|
16
|
+
- signature schema and algorithm;
|
|
17
|
+
- artifact kind and versioned artifact ID;
|
|
18
|
+
- the artifact's canonical SHA-256 identity;
|
|
19
|
+
- publisher key ID; and
|
|
20
|
+
- UTC issuance time.
|
|
21
|
+
|
|
22
|
+
Verification requires an explicit UTC time so historical automation remains
|
|
23
|
+
reproducible. The issuance and verification times must both fall inside the
|
|
24
|
+
key validity interval, and a future-issued signature is rejected. The output
|
|
25
|
+
record binds the signature digest and canonical trust-store digest.
|
|
26
|
+
|
|
27
|
+
## Verify a pack
|
|
28
|
+
|
|
29
|
+
Pack verification first validates the catalog binding and reruns the pinned
|
|
30
|
+
benchmark. Only then does it verify the detached signature against the
|
|
31
|
+
resulting canonical pack digest:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
prc pack verify \
|
|
35
|
+
--catalog-root . \
|
|
36
|
+
--file /path/to/pack.yaml \
|
|
37
|
+
--trust-store /path/to/trust-store.yaml \
|
|
38
|
+
--signature /path/to/pack.signature.yaml \
|
|
39
|
+
--verified-at 2026-08-23T13:00:00Z \
|
|
40
|
+
--format json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Verify an adapter registry
|
|
44
|
+
|
|
45
|
+
Registry verification first resolves every non-revoked manifest and checks its
|
|
46
|
+
ID, publisher, lifecycle, engine compatibility, and digest pins:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
prc adapter registry-verify \
|
|
50
|
+
--file /path/to/adapter-registry.yaml \
|
|
51
|
+
--trust-store /path/to/trust-store.yaml \
|
|
52
|
+
--signature /path/to/registry.signature.yaml \
|
|
53
|
+
--verified-at 2026-08-23T13:00:00Z \
|
|
54
|
+
--format json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The schemas are `trust-store.schema.json`, `signature.schema.json`, and
|
|
58
|
+
`signature-verification.schema.json`. The current repository does not publish
|
|
59
|
+
an official release trust store or signatures yet. Verification support is not
|
|
60
|
+
itself a key ceremony, secure private-key service, transparency log,
|
|
61
|
+
reproducible release, or revocation-distribution channel; those remain release
|
|
62
|
+
engineering requirements.
|
|
63
|
+
|
|
64
|
+
Risk-owner keys may also have the `risk-exception` scope. Those signatures are
|
|
65
|
+
verified only through the stricter
|
|
66
|
+
[risk-exception workflow](../scanner/risk-exceptions.md), which binds an
|
|
67
|
+
immutable failed finding, accountable people, evidence, monitoring,
|
|
68
|
+
remediation, and expiry without changing the scanner gate.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Bounded remediation contract
|
|
2
|
+
|
|
3
|
+
Remediation is a separate, policy-controlled phase. A failed assertion does not
|
|
4
|
+
automatically grant an agent permission to change a repository.
|
|
5
|
+
|
|
6
|
+
## Remediation classes
|
|
7
|
+
|
|
8
|
+
| Class | Capability | Default policy |
|
|
9
|
+
| --- | --- | --- |
|
|
10
|
+
| R0 | Explain or suggest only | Allowed |
|
|
11
|
+
| R1 | Deterministic, behavior-preserving edit | Allowed when the implementation is trusted |
|
|
12
|
+
| R2 | Agent-authored repository change | Experimental and isolated |
|
|
13
|
+
| R3 | Dependency or build behavior change | Explicit opt-in and stronger verification |
|
|
14
|
+
| R4 | Infrastructure or deployment-definition change | Human authorization required |
|
|
15
|
+
| R5 | External staging-system mutation | Separate connector policy and approval |
|
|
16
|
+
| R6 | Production, destructive, legal, financial, or risk decision | Prohibited in the general loop |
|
|
17
|
+
|
|
18
|
+
## Fix contract
|
|
19
|
+
|
|
20
|
+
Every attempt is bound to a signed or hashed contract containing:
|
|
21
|
+
|
|
22
|
+
- exact finding content ID, stable finding fingerprint, assertion, target, and
|
|
23
|
+
baseline result identifiers;
|
|
24
|
+
- desired postcondition;
|
|
25
|
+
- permitted and protected paths;
|
|
26
|
+
- permitted commands, tools, network, secrets, and external systems;
|
|
27
|
+
- maximum changed files, lines, bytes, attempts, time, and cost;
|
|
28
|
+
- required new or updated regression tests;
|
|
29
|
+
- invariant and regression checks;
|
|
30
|
+
- policy and scanner inputs that must remain unchanged; and
|
|
31
|
+
- the deterministic acceptance sequence.
|
|
32
|
+
|
|
33
|
+
The agent receives the minimum context needed for this contract. Unrelated source,
|
|
34
|
+
evidence, credentials, and previous agent memory are excluded.
|
|
35
|
+
|
|
36
|
+
## Candidate lifecycle
|
|
37
|
+
|
|
38
|
+
1. Capture an immutable baseline and reproduce the finding.
|
|
39
|
+
2. Create a fresh isolated workspace or worktree.
|
|
40
|
+
3. Apply one deterministic fix or run one provider task.
|
|
41
|
+
4. Parse the result as untrusted structured output.
|
|
42
|
+
5. Reject path, capability, policy, threshold, baseline, or suppression violations.
|
|
43
|
+
6. Run contract-specific tests and the original finding implementation.
|
|
44
|
+
7. Run impacted regression checks and anti-gaming validation.
|
|
45
|
+
8. Rescan affected assertions from fresh evidence.
|
|
46
|
+
9. Accept only when the original finding closes and no protected result regresses.
|
|
47
|
+
10. Preserve the candidate, transcript, evidence, and rejection or acceptance reason.
|
|
48
|
+
|
|
49
|
+
The current v0.8 remediation-run record adds a scanner-validated attempt chain,
|
|
50
|
+
binds any launched R2 test verification to its exact candidate inventory, and
|
|
51
|
+
records the scanner-owned wall-clock ceiling for the complete loop.
|
|
52
|
+
An accepted attempt must link to exactly one content-addressed candidate; an
|
|
53
|
+
agent attempt must link to exactly one successful provider execution or failed
|
|
54
|
+
provider invocation; a pre-candidate
|
|
55
|
+
policy rejection records its exact safe scanner reason without inventing a
|
|
56
|
+
candidate; and the accepted digest chain must end at the reported final
|
|
57
|
+
inventory. Missing, duplicate, reordered, or cross-linked records invalidate
|
|
58
|
+
the run before its content ID is computed.
|
|
59
|
+
|
|
60
|
+
An agent does not validate its own patch. A second model can challenge a candidate,
|
|
61
|
+
but only the independent deterministic acceptance sequence can approve it.
|
|
62
|
+
|
|
63
|
+
## Termination
|
|
64
|
+
|
|
65
|
+
The loop stops when:
|
|
66
|
+
|
|
67
|
+
- the selected profile is satisfied;
|
|
68
|
+
- only manual, external, prohibited, or inapplicable work remains;
|
|
69
|
+
- a no-go finding cannot be remediated within policy;
|
|
70
|
+
- an attempt makes no measurable improvement;
|
|
71
|
+
- the same root cause repeats without progress;
|
|
72
|
+
- any capability, change, attempt, or duration budget is exhausted; or
|
|
73
|
+
- the environment cannot execute the verifier safely.
|
|
74
|
+
|
|
75
|
+
The general loop never deploys and never accepts residual risk.
|
|
76
|
+
|
|
77
|
+
## Implemented R1 pilot
|
|
78
|
+
|
|
79
|
+
The current CLI implements this lifecycle for final-newline and restrictive-mode
|
|
80
|
+
R1 assertions. Its trusted fixers make exact byte or mode transformations in a
|
|
81
|
+
new external workspace. The acceptance audit verifies the raw tree, content
|
|
82
|
+
hashes, permission modes, protected paths, budgets, target result, and baseline
|
|
83
|
+
passing results. The bounded `fix` loop can repeat these registered operations in
|
|
84
|
+
sibling candidates, rescan after every accepted attempt, enforce cumulative
|
|
85
|
+
attempt, file, and line limits, and report why every unresolved item remains.
|
|
86
|
+
See the [R1 remediation guide](../scanner/remediation.md) for the exact commands
|
|
87
|
+
and limitations.
|
|
88
|
+
|
|
89
|
+
## Implemented R2 proposal pilot
|
|
90
|
+
|
|
91
|
+
The [read-only provider layer](agent-providers.md) can produce bounded Codex or
|
|
92
|
+
Claude Code proposals. The separate `remediate-proposal` command validates and
|
|
93
|
+
parses one proposal, applies it to a fresh external candidate without invoking
|
|
94
|
+
the provider, and runs raw-tree, exact-byte, mode, budget, target-result,
|
|
95
|
+
regression, and source-integrity audits. The provider never approves its own
|
|
96
|
+
work. Both one-shot remediation paths bind the exact verified baseline finding,
|
|
97
|
+
project configuration, protected paths, and file, line, and attempt ceilings
|
|
98
|
+
into a v0.3 fix contract. The default loop does not invoke providers. When
|
|
99
|
+
explicitly enabled,
|
|
100
|
+
`fix --provider` composes the read-only provider and scanner-owned proposal
|
|
101
|
+
paths only for a missing-test assertion with one bounded source input and new
|
|
102
|
+
test-file allowlist. The R2 contract also preserves the exact triggering
|
|
103
|
+
finding ID from the sealed provider task and requires both its content ID and
|
|
104
|
+
stable fingerprint to match a freshly reproduced failure. An R2 candidate cannot
|
|
105
|
+
be accepted without a separate digest-pinned OCI verifier. The scanner, not the
|
|
106
|
+
provider or repository, selects the Go, Python, or plain-JavaScript test argv;
|
|
107
|
+
the read-only
|
|
108
|
+
candidate runs without network, privileges, secrets, or host-write access and
|
|
109
|
+
with bounded resources and output. Before the candidate exists, a separate
|
|
110
|
+
language-aware payload audit rejects new tests that request process, network,
|
|
111
|
+
environment, filesystem-mutation, absolute-path, dynamic-evaluation, or encoded
|
|
112
|
+
payload capabilities that the focused task does not need. General R2 repair planning, TypeScript
|
|
113
|
+
verification, merges, deployments, and releases remain unimplemented.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Scanner trust and threat model
|
|
2
|
+
|
|
3
|
+
The scanner processes repositories, build artifacts, tool output, model output,
|
|
4
|
+
and external evidence that may be malformed, compromised, or intentionally
|
|
5
|
+
hostile. Safe operation therefore starts from a default-deny capability model.
|
|
6
|
+
|
|
7
|
+
## Trust zones
|
|
8
|
+
|
|
9
|
+
| Zone | Contents | Default trust |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Control plane | Catalog, profiles, policy, schemas, tool registry, verifier | Trusted and immutable for the run |
|
|
12
|
+
| Execution plane | Adapters, tools, builds, browsers, coding agents | Isolated and untrusted |
|
|
13
|
+
| Target plane | Repository, dependencies, artifacts, configuration, logs | Untrusted evidence source |
|
|
14
|
+
| External plane | CI, registry, cloud, cluster, telemetry, ticketing | Untrusted transport with explicitly configured authority |
|
|
15
|
+
|
|
16
|
+
The execution and target planes must not be able to mutate the control plane.
|
|
17
|
+
The verifier must consume immutable inputs captured before candidate remediation.
|
|
18
|
+
Inventory-file and benchmark-fixture reads bind an opened file back to the
|
|
19
|
+
root-scoped entry that was inspected. Git identity is read only through an
|
|
20
|
+
`os.Root` rooted at the target: metadata paths and symlinks cannot escape it,
|
|
21
|
+
and external `gitdir` indirection is rejected rather than followed.
|
|
22
|
+
|
|
23
|
+
## Threats in scope
|
|
24
|
+
|
|
25
|
+
- prompt injection in instructions, comments, documentation, fixtures, logs, test
|
|
26
|
+
names, generated files, issue text, dependency metadata, and tool output;
|
|
27
|
+
- command injection through filenames, configuration, shell fragments, or adapter
|
|
28
|
+
fields;
|
|
29
|
+
- path traversal, symlink escape, archive bombs, oversized output, and resource
|
|
30
|
+
exhaustion;
|
|
31
|
+
- malicious build scripts, compilers, package-manager hooks, test runners, browser
|
|
32
|
+
targets, and language servers;
|
|
33
|
+
- evidence forgery, replay, staleness, scope confusion, artifact substitution, and
|
|
34
|
+
contradictory sources;
|
|
35
|
+
- an agent weakening tests, policies, thresholds, assertions, baselines, or
|
|
36
|
+
suppressions instead of fixing a defect;
|
|
37
|
+
- poisoned tools, mutable tags, compromised dependencies, and unverified plugins;
|
|
38
|
+
- credential theft, unintended network access, and cross-run state leakage; and
|
|
39
|
+
- unsafe production actions caused by a repository scan or remediation request.
|
|
40
|
+
|
|
41
|
+
## Capability policy
|
|
42
|
+
|
|
43
|
+
Every executable unit receives an explicit capability manifest. Omitted
|
|
44
|
+
capabilities are denied.
|
|
45
|
+
|
|
46
|
+
The manifest covers at least:
|
|
47
|
+
|
|
48
|
+
- readable and writable paths;
|
|
49
|
+
- executable identities and arguments;
|
|
50
|
+
- environment variables and secret handles;
|
|
51
|
+
- network destinations and methods;
|
|
52
|
+
- CPU, memory, process, file, output, and wall-clock budgets;
|
|
53
|
+
- external systems and allowed operations;
|
|
54
|
+
- remediation class and protected paths; and
|
|
55
|
+
- whether a human authorization is required.
|
|
56
|
+
|
|
57
|
+
Scanner policy is snapshotted and hashed before execution. A candidate that
|
|
58
|
+
changes policy inputs is rejected and cannot validate itself.
|
|
59
|
+
|
|
60
|
+
## Isolation tiers
|
|
61
|
+
|
|
62
|
+
| Tier | Intended workload | Required boundary |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| 0 | File parsing and metadata inspection | No target code execution |
|
|
65
|
+
| 1 | Curated native read-only checks | OS sandbox, read-only target, no network |
|
|
66
|
+
| 2 | Curated third-party tools | Rootless pinned container, read-only mounts, no socket, no network by default |
|
|
67
|
+
| 3 | Untrusted builds, parsers, tests, and agents | Disposable gVisor, Kata, microVM, or VM-equivalent boundary |
|
|
68
|
+
| 4 | Staging or production evidence | Separate read-only connector identity and explicit organization policy |
|
|
69
|
+
|
|
70
|
+
A container is packaging and an isolation layer, not a universal hostile-code
|
|
71
|
+
security boundary. Implementations must support a stronger Tier 3 runner rather
|
|
72
|
+
than treating ordinary OCI isolation as sufficient.
|
|
73
|
+
|
|
74
|
+
## Agent boundary
|
|
75
|
+
|
|
76
|
+
Agent integrations receive a scanner-created context bundle and an isolated
|
|
77
|
+
candidate workspace. Repository `AGENTS.md`, `CLAUDE.md`, hooks, MCP settings,
|
|
78
|
+
plugins, and similar files are target data, not scanner instructions.
|
|
79
|
+
|
|
80
|
+
Agents may propose changes only inside the fix contract. They cannot determine
|
|
81
|
+
Pass, approve exceptions, alter policy, access unrelated files, or deploy.
|
|
82
|
+
|
|
83
|
+
## Immediate stops
|
|
84
|
+
|
|
85
|
+
Execution stops safely when the scanner observes:
|
|
86
|
+
|
|
87
|
+
- a capability request outside policy;
|
|
88
|
+
- a sandbox or path-boundary violation;
|
|
89
|
+
- unexpected credential, network, or external-system access;
|
|
90
|
+
- ambiguous mutation of a protected file;
|
|
91
|
+
- evidence identity or digest mismatch;
|
|
92
|
+
- a tool or provider version outside its supported contract; or
|
|
93
|
+
- an unbounded or repeatedly non-improving remediation loop.
|
|
94
|
+
|
|
95
|
+
The stop is recorded as evidence. It is never silently converted into a pass.
|