Skip to content

feat: emit VC v1.0 outputs from Docker action entrypoint - #313

Merged
Rahul Dass (rahuldass19) merged 4 commits into
mainfrom
feat/docker-vc-outputs
Aug 13, 2026
Merged

feat: emit VC v1.0 outputs from Docker action entrypoint#313
Rahul Dass (rahuldass19) merged 4 commits into
mainfrom
feat/docker-vc-outputs

Conversation

@rahuldass19

@rahuldass19 Rahul Dass (rahuldass19) commented Aug 13, 2026

Copy link
Copy Markdown
Member

Closes QWED-AI/qwed-verification-action#9.

Adds Verification Context v1.0 output support to the Docker action entrypoint.

Changes

  • Added _build_verification_context() helper that builds a VC v1.0 document
  • Added _set_vc_outputs() helper that sets verdict, admission, proof_ref, and verification_context outputs via GITHUB_OUTPUT
  • Updated all 5 action modes (verify, scan-secrets, scan-code, verify-shell, verify-process) to emit VC v1.0 outputs
  • verification_context output is emitted when output_format=verification-context or output_format=json

VC v1.0 contract

Output Values
verdict VERIFIED / UNVERIFIABLE / BLOCKED
admission ADMIT / DENY
proof_ref sha256:<64-hex> or empty
verification_context Full VC v1.0 JSON document
verified true only when verdict=VERIFIED and admission=ADMIT

Fail-closed

  • UNVERIFIABLE / BLOCKED always produce admission: DENY
  • proof_ref is empty when not VERIFIED

Related


CodeAnt-AI Description

Emit Verification Context v1.0 results from every Docker action mode

What Changed

  • All verification and scanning modes now report a standard verdict, admission decision, and proof reference.
  • Successful checks include a SHA-256 proof reference; failed or unverifiable checks deny admission and leave the proof reference empty.
  • Verification Context v1.0 JSON is available when the output format is verification-context or json, including scan evidence and configuration details.

Impact

✅ Consistent results across all action modes
✅ Fail-closed admission decisions for findings
✅ Machine-readable verification evidence

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

New Features

  • Added SHA-256 verification proof references.
  • Verification and scan results now include verdicts, admission decisions, and proof references.
  • Added optional, versioned verification-context output containing scan metadata, verification details, supporting evidence, and admission decisions.
  • Verification results now provide clearer, more complete information for validation and review.

@codeant-ai

codeant-ai Bot commented Aug 13, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 5243b0b Aug 13, 2026 · 01:56 01:59

@qwed-security

qwed-security Bot commented Aug 13, 2026

Copy link
Copy Markdown

QWED Security Verification Report

1 files scanned | 0 blocked | 0 warnings | 1 info | 0 suppressed | 0 verified | 1 pre-existing

Pre-existing Findings (not introduced by this PR — advisory)

File Line Context Issue
action_entrypoint.py L52 RUNTIME_CODE TAINT_FLOW_BOUNDARY violation: Tainted data from os.environ.get reaches open -- Path traversal. Flow: os -> output_file -> output_path

Engines

  • codeguard: ✅
  • entropy_scan: ✅
  • pattern_scan: ✅
  • python_ast: ✅
  • python_deep_ast: ✅
  • taint_analysis: ⚠️ 1 finding(s)
  • verification_integrity: ✅

Verified by QWED — deterministic security verification. No LLM used.

@codeant-ai

codeant-ai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@dosubot dosubot Bot added enhancement New feature or request python Pull requests that update python code labels Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f392702-31b4-441e-b1b6-01361bc34c46

📥 Commits

Reviewing files that changed from the base of the PR and between 747e3a1 and 3913ea8.

📒 Files selected for processing (1)
  • action_entrypoint.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • action_entrypoint.py

📝 Walkthrough

Walkthrough

The action entrypoint now generates versioned Verification Context documents and SHA-256 proof references. Verification and scan modes emit verdict, admission, proof reference, and optional serialized context outputs.

Changes

Verification Context Outputs

Layer / File(s) Summary
Verification mode integration
action_entrypoint.py
Single-output verification and process, secrets, code, and shell scans now provide mode-specific verdicts, admission decisions, and evidence.
Context construction and output publishing
action_entrypoint.py
The entrypoint builds versioned Verification Context documents, hashes canonical content for verified proof references, and publishes standard and serialized outputs.
Deterministic proof-reference inputs
action_entrypoint.py
The entrypoint imports canonical JSON serialization and SHA-256 hashing for deterministic proof-reference generation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: 🟠 High · up to 3913e

The Docker action now emits standardized verdict, admission, proof, and context outputs, but current behavior can still admit partially failed verification, reuse an unbound process proof reference, and emit contradictory context for some modes or denied results. These issues can mislead downstream automation and weaken fail-closed guarantees, so merge should wait for fixes or explicit owner acceptance.

Sequence Diagram(s)

sequenceDiagram
  participant VerificationMode
  participant VerificationContext
  participant GITHUB_OUTPUT
  VerificationMode->>VerificationContext: Provide verdict, admission, and evidence
  VerificationContext->>VerificationContext: Canonicalize and hash context data
  VerificationContext->>GITHUB_OUTPUT: Emit verdict, admission, and proof_ref
  VerificationContext->>GITHUB_OUTPUT: Emit serialized verification_context for selected formats
Loading

Possibly related issues

Possibly related PRs

Suggested labels: verification

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the VC changes and fail-closed behavior, but it omits the required enforcement checklist, Validation section, and Notes section. Add the required checklist, Validation section with tests or scans, and Notes section explaining compliance with QWED_RULES.md.
Linked Issues check ⚠️ Warning The entrypoint output requirements in issue #9 are addressed, but the required versioned image tag and action re-pin are not shown. Publish the VC-capable image with a versioned tag and re-pin qwed-verification-action from latest.
Docstring Coverage ⚠️ Warning Docstring coverage is 58.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: emitting Verification Context v1.0 outputs from the Docker action entrypoint.
Out of Scope Changes check ✅ Passed The changes are limited to Docker action entrypoint output generation and align with the linked issue's VC v1.0 objectives.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/docker-vc-outputs

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

❤️ Share

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

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 13, 2026
@codspeed-hq

codspeed-hq Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing feat/docker-vc-outputs (3913ea8) with main (5214f2c)

Open in CodSpeed

Comment thread action_entrypoint.py Outdated
Comment thread action_entrypoint.py Outdated
Comment thread action_entrypoint.py Outdated
Comment thread action_entrypoint.py
Comment thread action_entrypoint.py Outdated
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread action_entrypoint.py Outdated
Comment thread action_entrypoint.py Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@action_entrypoint.py`:
- Around line 108-112: Update action_entrypoint.py lines 108-112 in
action_verify’s client-error path to publish BLOCKED, DENY, and an empty
proof_ref before exiting. At lines 191-195, 268-272, and 321-325, record
secret-scan, syntax/scan, and shell-scan read failures respectively, then ensure
final verdict generation emits BLOCKED and DENY with an empty proof_ref whenever
any failure occurred, rather than certifying partial findings as VERIFIED/ADMIT.
- Around line 511-513: Update the formal_statement construction in the result
object to derive its wording from both scan_type and verdict. Name the specific
verification mode (security, math, logic, code, or process integrity) and
accurately reflect whether the result passed or was denied, avoiding a universal
security-scan success message.
- Around line 396-400: Update the process evidence flow around _set_vc_outputs
so proof_ref is generated from the exact evidence object containing irac_score
and process_rate, using canonical deterministic serialization. Ensure
authorized/VERIFIED output is emitted only when this evidence-derived proof_ref
is non-empty, while unauthorized behavior remains unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 79d0e357-c954-40f6-bd5b-fa4bad8e9e99

📥 Commits

Reviewing files that changed from the base of the PR and between 5214f2c and 5243b0b.

📒 Files selected for processing (1)
  • action_entrypoint.py

Comment thread action_entrypoint.py Outdated
Comment thread action_entrypoint.py
Comment thread action_entrypoint.py
@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown

Greptile Summary

This change adds Verification Context v1.0 outputs across the action modes. Executed clean and finding-producing code-scan runs confirmed that verified contexts use a canonical content-bound proof reference, denied contexts use DENY with a null in-document proof reference, and the formal statement reflects the outcome.

Confidence Score: 5/5

No blocking failure remains.

No accepted P0 or P1 findings remain.

Reviews (4): Last reviewed commit: "fix: use is_verified and result dict for..." | Re-trigger Greptile

Comment thread action_entrypoint.py Outdated
Comment thread action_entrypoint.py Outdated
- proof_ref now computed from full VC payload (formal_statement + context)
  excluding only context.evidence.proof_ref, per spec
- formal_statement now reflects actual verdict (passed/detected/blocked)
- proof_ref is null (not empty string) for UNVERIFIABLE/BLOCKED verdicts
- process mode proof_ref binds irac_score and process_rate evidence
- scan modes bind findings_count evidence, not just count
- removed ad-hoc proof_ref hashing from all callers
Comment thread action_entrypoint.py Outdated
Comment thread action_entrypoint.py Outdated
…ify mode

- proof_ref now computed using _canonical_json (RFC 8785-compatible)
  instead of json.dumps, ensuring Unicode evidence resolves correctly
- paths key omitted from configuration when PATHS env var is not set
  (e.g., action_verify mode), avoiding false directory-scan claims
Comment thread action_entrypoint.py Outdated
@rahuldass19

Copy link
Copy Markdown
Member Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- VerificationResult from qwed_sdk.models has is_verified, not verified
- explanation is in result.result dict, not a direct attribute
- fixes AttributeError crash in action_verify mode
@sonarqubecloud

Copy link
Copy Markdown

@rahuldass19
Rahul Dass (rahuldass19) merged commit 637a880 into main Aug 13, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update python code size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker image needs VC v1.0 output support and versioned tag pinning

1 participant