Repository navigation
ci: improve evidence scan diagnostics and action pinning - #1589
Merged
Merged
Conversation
Lore: Make replay-scan failures distinguish secret findings from infrastructure errors while keeping raw scanner output out of uploaded artifacts. Constraint: Preserve the network-disabled, read-only evidence scan and enforce immutable third-party Action references across workflow and composite-action files. Tested: 57 focused and contract tests passed; action pin scan, Ruff, shell syntax, YAML parsing, and diff checks passed. Not-tested: Full make check remains blocked by pre-existing ty errors in artifact_processing.py and test_artifact_processing.py. Co-authored-by: OmX <omx@oh-my-codex.dev>
Lore: Harden uploaded E2E diagnostics against arbitrary scanner text and parse YAML action references semantically. Constraint: Keep raw scanner JSON and stderr in runner-local files while exposing only bounded, fixed diagnostics and requiring 40-character third-party action pins. Tested: uv run --locked python -m pytest tests/test_scan_e2e_evidence.py tests/test_workflow_actions.py tests/test_e2e_workflow_contract.py; uv run --locked ruff check; uv run --locked ruff format --check; make contract-test; bash -n scripts/scan_e2e_evidence.sh; uv run --locked python scripts/check_workflow_actions.py .github/workflows .github/actions; git diff --check. Not-tested: make workflow-actions-check reaches the repository's pre-existing ty baseline errors in artifact_processing.py and its tests. Co-authored-by: OmX <omx@oh-my-codex.dev>
Lore: Keep diagnostic headers and scanner inputs bounded, and make YAML action validation deterministic under malformed or aliased documents. Constraint: Raw scanner output stays runner-local; uploaded diagnostics contain only fixed fields, immutable image references, and allowlisted findings. Tested: uv run --locked python -m pytest tests/test_scan_e2e_evidence.py tests/test_workflow_actions.py tests/test_e2e_workflow_contract.py; uv run --locked ruff check scripts/check_workflow_actions.py tests/test_scan_e2e_evidence.py tests/test_workflow_actions.py; uv run --locked ruff format --check scripts/check_workflow_actions.py tests/test_scan_e2e_evidence.py tests/test_workflow_actions.py; bash -n scripts/scan_e2e_evidence.sh; uv run --locked python scripts/check_workflow_actions.py .github/workflows .github/actions; make contract-test; git diff --check. Not-tested: make workflow-actions-check remains blocked only by the repository's pre-existing ty diagnostics in artifact_processing.py and its tests. Co-authored-by: OmX <omx@oh-my-codex.dev>
Lore: Keep diagnostic headers and scanner inputs bounded, and make YAML action validation deterministic under malformed or aliased documents. Constraint: Raw scanner output stays runner-local; uploaded diagnostics contain only fixed fields, immutable image references, and allowlisted findings. Tested: uv run --locked python -m pytest tests/test_scan_e2e_evidence.py tests/test_workflow_actions.py tests/test_e2e_workflow_contract.py; uv run --locked ruff check scripts/check_workflow_actions.py tests/test_scan_e2e_evidence.py tests/test_workflow_actions.py; uv run --locked ruff format --check scripts/check_workflow_actions.py tests/test_scan_e2e_evidence.py tests/test_workflow_actions.py; bash -n scripts/scan_e2e_evidence.sh; uv run --locked python scripts/check_workflow_actions.py .github/workflows .github/actions; make contract-test; git diff --check. Not-tested: make check remains blocked only by the repository's pre-existing ty diagnostics in artifact_processing.py and its tests; the new checker warning was fixed by explicit BaseResolver import. Co-authored-by: OmX <omx@oh-my-codex.dev>
Contributor
Author
Contributor
Author
|
Addressed the latest scanner diagnostics review comments in 5598e4d:
Local validation:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #1587.
Rationale for this change
The CI hardening in #1587 made replay evidence fail-closed, but the scanner step discarded all output and treated TruffleHog findings and scanner infrastructure failures identically. The repository also had no automated guard or update configuration for its pinned GitHub Actions.
What changes are included in this PR?
summary.txtwhen the scenario or scan fails.findings; classify other non-zero results asinfra_errorafter one retry.make check.Are there any user-facing changes?
No product or API changes. CI failures now include actionable sanitized diagnostics while raw scanner output remains excluded from artifacts.
How was this change tested?
uv run python -m pytest tests/test_workflow_actions.py tests/test_e2e_workflow_contract.py tests/test_scan_e2e_evidence.py tests/test_api_contract.py tests/test_js_operations.py -q(57 passed)uv run ruff checkanduv run ruff format --checkon changed Python filesgit diff --checkmake contract-test(48 passed)make checkreaches the existingtygate but remains blocked by pre-existing type errors insrc/powercontext/builtin/runtime/artifact_processing.pyandtests/builtin/runtime/test_artifact_processing.py.AI usage statement
Implemented with Codex using repository-local tests and review evidence.