Skip to content

Commit 2e14e39

Browse files
committed
docs: close consumer alpha readiness gaps
1 parent b85f2e0 commit 2e14e39

15 files changed

Lines changed: 168 additions & 30 deletions

.github/workflows/g0-contract.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,16 @@ jobs:
6565
6666
- name: Validate Ecosystem Baseline composition and planted fixtures
6767
run: |
68-
bash scripts/test-ecosystem-baseline.sh
68+
result_file="${RUNNER_TEMP}/ecosystem-baseline-detection.json"
69+
docker run --rm \
70+
--volume "${GITHUB_WORKSPACE}:/src:ro" \
71+
--workdir /src \
72+
semgrep/semgrep:1.93.0@sha256:f35c7891e2030110a84a721fdd556ce8f3da6e7e69d7fab1d3660ae1bb334474 \
73+
semgrep scan --metrics=off --disable-version-check \
74+
--config rules/ecosystem-baseline.yml \
75+
--json test/fixtures/ecosystem-baseline/monorepo > "$result_file"
76+
BASELINE_RUN_DETECTION=true BASELINE_RESULT_FILE="$result_file" \
77+
bash scripts/test-ecosystem-baseline.sh
6978
bash scripts/test-consumer-alpha.sh
7079
7180
- name: Validate shell, workflow, example, and fork-fixture syntax

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ policy, exceptions, upgrades, and rollback across projects.
4141
- [Evaluation adapter](reference/evaluation-adapter.md)
4242
- [Evidence Bundle and profile conclusion](reference/evidence-bundle.md)
4343
- [Ecosystem Baseline static rules](reference/ecosystem-baseline-rules.md)
44+
- [Permission-free Zizmor adapter](reference/zizmor-scan.md)
4445
- [Release integrity](reference/release-integrity.md)
4546
- [Fork pull-request safety](reference/fork-pr-safety.md)
4647
- [Documentation architecture](DOCUMENTATION-ARCHITECTURE.md)

docs/consumers/quickstart.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ license, package installation, build command, or write permission. An unrelated
3333
4. Confirm the workflow uses ordinary `pull_request`, not
3434
`pull_request_target`.
3535

36-
The example starts all finding gates advisory while keeping
37-
`require-complete: true`. Tool failure, missing evidence, a skipped required
36+
The example starts its configurable workflow, dependency, IaC, and static
37+
analysis gates advisory while keeping `require-complete: true`. Gitleaks
38+
findings remain blocking. Tool failure, missing evidence, a skipped required
3839
evaluation, or malformed output still fails `Profile Conclusion`.
3940

4041
## Verify The First Run

docs/consumers/understand-results.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,26 @@ not equivalent to zero findings.
1616

1717
## Current Behavior
1818

19-
The scanner outcome adapter and AI review action now emit the pre-v1
20-
[Evaluation Result contract](../reference/evaluation-result.md):
19+
The Ecosystem Baseline's five scanner adapters and the AI review action emit
20+
the pre-v1 [Evaluation Result contract](../reference/evaluation-result.md):
2121

2222
- scanner outputs may appear in job logs, SARIF, or artifacts;
2323
- supported scanner gates keep advisory findings green by policy while
2424
malformed SARIF and tool failure fail independently;
2525
- scanner event/configuration skips are represented as `skipped`;
2626
- AI refusal and large-diff or response truncation are `incomplete`;
2727
- a missing Anthropic secret is `skipped`, never zero findings;
28-
- the umbrella workflow does not aggregate one authoritative completion status.
28+
- the Ecosystem Baseline aggregates its five required results into one Evidence
29+
Bundle and one authoritative `Profile Conclusion` check.
2930

30-
Until evidence aggregation is complete, inspect each action's
31-
`evaluation-result` output alongside its raw artifact and job conclusion.
31+
For the Ecosystem Baseline, start with `Profile Conclusion` and the
32+
`ecosystem-baseline-evidence` artifact. Inspect an individual Evaluation Result
33+
and its raw evidence when the bundle reports findings or incomplete coverage.
3234

33-
For Trivy and Semgrep, the scanner-outcome adapter validates SARIF and reports
34-
all four completion states independently from `findings`/`no-findings` and
35-
`pass`/`fail`/`skip`/`error`. The parent workflow does not yet aggregate those
36-
values into one authoritative Evidence Bundle.
35+
The legacy full security pipeline has not migrated every scanner to the
36+
aggregate contract. In that pipeline, inspect each scanner's result, raw
37+
artifact, and job conclusion independently; do not infer suite-wide completion
38+
from a green parent workflow.
3739

3840
## Target Completion Status
3941

docs/maintainers/g0-gate.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ It runs on every pull request and every push to `main`; it has only
2525
| Completion is never inferred from green status | Evaluation Result schema check | `test-evaluation-result.sh` covers complete, incomplete, skipped, and error outputs |
2626
| Secret scanning is secretless and scoped | checksum-pinned Gitleaks adapter | `test-gitleaks-scan.sh` plants credentials and tests PR-range/full-history behavior |
2727
| Consumer workflow definitions are evaluated | pinned Zizmor workflow | `test-consumer-actions-security.sh` plants unsafe triggers, refs, permissions, interpolation, checkout, OIDC, and invalid YAML |
28+
| Ecosystem rules detect supported language fixtures | digest-pinned Semgrep image | `test-ecosystem-baseline.sh` requires detections in Go, Rust, JavaScript, Solidity, and Dockerfile fixtures |
2829
| One pin selects the complete immutable graph | `check-release-graph.sh` | `test-release-graph.sh` mutates refs, image digests, nested workflows, and assets |
2930
| Fork PRs stay inside read-only, secretless boundaries | `check-fork-pr.sh` | `test-fork-pr.sh` mutates all eight fork boundaries |
3031
| Consumer examples remain valid contracts | documentation, authority, trust, and syntax checks | any stale permission, mutable pin, unsafe input, or invalid YAML fails G0 |

docs/reference/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ will replace manual tables after the evaluation and profile schemas stabilize.
1111
- [Evaluation adapter](evaluation-adapter.md)
1212
- [Evidence Bundle and profile conclusion](evidence-bundle.md)
1313
- [Ecosystem Baseline static rules](ecosystem-baseline-rules.md)
14+
- [Permission-free Zizmor adapter](zizmor-scan.md)
1415
- [Release integrity](release-integrity.md)
1516
- [Fork pull-request safety](fork-pr-safety.md)
1617

@@ -36,6 +37,7 @@ will replace manual tables after the evaluation and profile schemas stabilize.
3637

3738
- [AI code-review metadata](../../actions/ai-code-review/action.yml)
3839
- [Secretless Gitleaks adapter](../../actions/gitleaks-scan/action.yml)
40+
- [Permission-free Zizmor adapter](../../actions/zizmor-scan/action.yml)
3941
- [AI result schema](../../actions/ai-code-review/scripts/schema.json)
4042
- [Scanner outcome adapter](../../actions/scanner-outcome/action.yml)
4143
- [Generic evaluation adapter](../../actions/evaluation-adapter/action.yml)

docs/reference/current-contracts.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ The [Ecosystem Baseline](../../.github/workflows/ecosystem-baseline.yml) is the
8989
consumer-testable normalized profile. It composes workflow security,
9090
dependencies, secrets, IaC, and repository-owned static rules, then emits one
9191
Evidence Bundle and `Profile Conclusion`. Its inputs are
92-
`dependency-blocking`, `iac-blocking`, `static-analysis-blocking`,
93-
`require-complete`, and `skip-dirs`.
92+
`actions-security-blocking`, `dependency-blocking`, `iac-blocking`,
93+
`static-analysis-blocking`, `require-complete`, and `skip-dirs`.
9494

9595
### Scanner Toggles
9696

@@ -113,11 +113,13 @@ Evidence Bundle and `Profile Conclusion`. Its inputs are
113113
| Input | Default | Notes |
114114
|---|---|---|
115115
| `skip-dirs` | `node_modules` | Comma-separated Trivy exclusions |
116+
| `actions-security-blocking` | `false` | Fail on workflow-definition findings; tool failure always fails |
116117
| `semgrep-blocking` | `false` | Fail on custom-rule findings; tool failure always fails |
117118
| `codeql-languages` | `["javascript-typescript"]` | JSON array |
118119
| `dependency-review-fail-on-severity` | `high` | Dependency-review threshold |
119120
| `dependency-blocking` | `false` | Fail on dependency findings; tool failure always fails |
120121
| `dependency-severity` | `CRITICAL,HIGH,MEDIUM` | Dependency findings included in the gate |
122+
| `publish-sarif` | `false` | Publish dependency SARIF using a separate write-authorized job |
121123
| `iac-blocking` | `false` | Fail on IaC findings; tool failure always fails |
122124
| `iac-severity` | `CRITICAL,HIGH,MEDIUM` | IaC findings included in the gate |
123125
| `license-blocking` | `false` | Fail on license findings; tool failure always fails |

docs/reference/zizmor-scan.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Permission-Free Zizmor Adapter
2+
3+
**Stability:** consumer-testable pre-v1 alpha. Introduced in the optimization
4+
release candidate; its inputs and outputs may change before v1.
5+
6+
**Owner:** Filecoin ecosystem security platform maintainers. A repository-wide
7+
CODEOWNERS policy has not yet been established and remains a pre-v1 governance
8+
gap.
9+
10+
[`actions/zizmor-scan`](../../actions/zizmor-scan/action.yml) inspects GitHub
11+
Actions workflow and action definitions with Zizmor 1.28.0 in offline mode. It
12+
separates operational success from findings and does not require GitHub Code
13+
Security or `security-events: write`.
14+
15+
## Immutable Consumption
16+
17+
The supported Ecosystem Baseline already composes this adapter. Platform
18+
Maintainers needing it inside a custom job can pin the repository action:
19+
20+
```yaml
21+
permissions:
22+
contents: read
23+
24+
steps:
25+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
26+
with:
27+
persist-credentials: false
28+
- id: zizmor
29+
uses: filecoin-project/ff-sec-actions/actions/zizmor-scan@a6c0e17e90c5d2baef63b32e490c1f080ab97add
30+
with:
31+
input-path: .
32+
result-file: ${{ runner.temp }}/zizmor-actions.sarif
33+
```
34+
35+
Do not replace either full commit with a branch or mutable tag. Consumer
36+
Engineers who want the normalized result and stable merge check should use the
37+
[Ecosystem Baseline](../consumers/ecosystem-baseline.md), not this leaf action.
38+
39+
## Authority And Execution Boundary
40+
41+
| Boundary | Behavior |
42+
|---|---|
43+
| Permissions | The adapter calls no GitHub API. A preceding checkout normally needs only `contents: read`. |
44+
| Secrets | None required or read. |
45+
| Network | Downloads a Zizmor release archive from GitHub over HTTPS unless `ZIZMOR_BIN` selects a preinstalled executable. The archive SHA-256 is pinned per supported platform. Zizmor itself runs `--offline`. |
46+
| Consumer code | Parses workflow YAML and action metadata; it does not run project build, package-manager, shell, or lifecycle commands. |
47+
48+
## Inputs
49+
50+
| Input | Required | Default | Meaning |
51+
|---|---:|---|---|
52+
| `input-path` | No | `.` | Repository path containing workflow and action definitions. |
53+
| `config-path` | No | Empty | Explicit Zizmor configuration. Empty disables repository configuration discovery. |
54+
| `result-file` | No | `zizmor-results.sarif` | Runner-local SARIF destination. |
55+
56+
## Outputs And Completion
57+
58+
| Output | Meaning |
59+
|---|---|
60+
| `scanner-outcome` | `success` when Zizmor ran and emitted SARIF, including when it found issues; `failure` for installation or scanner errors. |
61+
| `result-file` | The requested runner-local SARIF path. |
62+
63+
Findings do not fail this leaf action. Its caller must validate SARIF and choose
64+
advisory or blocking policy; the supported `sec-actions.yml` workflow does that
65+
with the Evaluation Adapter. Operational failure is exposed through
66+
`scanner-outcome=failure` so it cannot be represented as zero findings.
67+
68+
The action itself uploads no artifact and sets no retention period. The
69+
supported workflow uploads `evaluation-result-zizmor-actions` using GitHub's
70+
repository-default artifact retention. Raw SARIF remains runner-local unless a
71+
caller explicitly uploads it.
72+
73+
## Events, Forks, And Runners
74+
75+
The action has no event-specific behavior and can run on `pull_request`,
76+
`push`, `schedule`, or `workflow_dispatch`. It is fork-safe under a normal
77+
`pull_request` when the caller keeps read-only permissions and passes no
78+
secrets. Do not switch a consumer workflow to `pull_request_target`.
79+
80+
The verified installer supports GitHub-hosted Linux and macOS runners on x64
81+
and arm64. Other operating systems and architectures fail explicitly. Self-
82+
hosted runners must provide the same basic shell tools and outbound access, or
83+
preinstall Zizmor and select it with `ZIZMOR_BIN`.
84+
85+
## Compatibility And Deprecation
86+
87+
The adapter currently fixes Zizmor at 1.28.0 and uses its SARIF interface.
88+
Changing the tool version, checksums, severity/persona defaults, output shape,
89+
or supported platforms requires fixture verification and a reviewed immutable
90+
pin advance. There is no deprecated input or migration path yet because this
91+
surface is pre-v1.
92+
93+
## Next
94+
95+
- [Adopt the Ecosystem Baseline](../consumers/ecosystem-baseline.md)
96+
- [Understand Evaluation Results](../consumers/understand-results.md)
97+
- [Review release integrity](release-integrity.md)

examples/consumer-security-pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
# installation hooks from repository content.
3737
skip-dirs: node_modules,contracts/lib,.sst
3838
publish-sarif: ${{ vars.ENABLE_GHAS == 'true' }}
39-
# GitHub Actions security is enabled by default and blocks medium-or-higher
40-
# zizmor auditor findings. Keep findings advisory for the first run, then
41-
# set actions-security-blocking: true after triage.
39+
# GitHub Actions security is enabled by default and reports
40+
# medium-or-higher Zizmor auditor findings. Keep them advisory for the
41+
# first run, then set actions-security-blocking: true after triage.
4242
actions-security-blocking: false
4343
# Finding gates are independent from tool failure; tool failure always
4444
# fails. Uncomment only after observing the advisory result volume:

scripts/check-docs.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ required_pages=(
6363
"docs/reference/evaluation-adapter.md"
6464
"docs/reference/evidence-bundle.md"
6565
"docs/reference/ecosystem-baseline-rules.md"
66+
"docs/reference/zizmor-scan.md"
6667
"docs/reference/release-integrity.md"
6768
"docs/reference/fork-pr-safety.md"
6869
"docs/DOCUMENTATION-ARCHITECTURE.md"
@@ -159,6 +160,13 @@ if [ -f ".github/workflows/g0-contract.yml" ]; then
159160
require_text ".github/workflows/g0-contract.yml" "bash scripts/check-fork-pr.sh"
160161
require_text ".github/workflows/g0-contract.yml" "bash scripts/test-fork-pr.sh"
161162
require_text ".github/workflows/g0-contract.yml" "bash scripts/test-ecosystem-baseline.sh"
163+
require_text ".github/workflows/g0-contract.yml" "BASELINE_RUN_DETECTION=true"
164+
require_text ".github/workflows/g0-contract.yml" "semgrep/semgrep:1.93.0@sha256:f35c7891e2030110a84a721fdd556ce8f3da6e7e69d7fab1d3660ae1bb334474"
165+
fi
166+
167+
if [ -f "docs/reference/current-contracts.md" ]; then
168+
require_text "docs/reference/current-contracts.md" "actions-security-blocking"
169+
require_text "docs/reference/current-contracts.md" "publish-sarif"
162170
fi
163171

164172
if grep -REq '^[[:space:]-]*uses:.*@v1([[:space:]]|$)' examples; then

0 commit comments

Comments
 (0)