Skip to content

Add governance artifact validation suite, schemas, Rego policies and CI#63

Merged
OneFineStarstuff merged 4 commits into
mainfrom
codex/create-agi-governance-blueprint-for-2026-2030
Apr 27, 2026
Merged

Add governance artifact validation suite, schemas, Rego policies and CI#63
OneFineStarstuff merged 4 commits into
mainfrom
codex/create-agi-governance-blueprint-for-2026-2030

Conversation

@OneFineStarstuff

@OneFineStarstuff OneFineStarstuff commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a deterministic, machine-readable governance artifact bundle and validation pipeline for the AGI/ASI governance blueprint (2026–2030).
  • Enable compliance-as-code workflows, automated evidence manifest generation/verification, and policy-as-code checks for regulator-ready artifacts.
  • Prevent stale generated artifacts and make pre-PR validation reproducible locally and in CI.

Description

  • Add a GitHub Actions workflow governance-artifacts-ci.yml that installs dependencies, runs schema/semantic validators, OPA/Rego formatting and tests, evidence manifest generation/verification, run report generation/validation, and uploads the validation report.
  • Add a Makefile with targets for governance setup and checks such as governance-validate, governance-policy-test, governance-validator-test, governance-evidence-manifest, governance-evidence-verify, governance-evidence-schema, governance-report, governance-report-schema, and governance-check-generated.
  • Add validation tooling and schemas under docs/schemas/: JSON schemas, YAML profile (agi_asi_governance_profile_2026_2030.yaml), compliance mapping JSON, evidence manifest generator/verifier, run-report runner and validators, inventory validator, helper _validation_deps.py, determinism helpers, and README.md/CONTRIBUTING.md.
  • Add OPA policy (ai_governance.rego) and unit tests (ai_governance_test.rego), plus a comprehensive set of Python unit tests (test_*.py) and pre-commit configuration (.pre-commit-config.yaml) and yamllint settings (.yamllint).

Testing

  • CI run executed the full chain of checks via the new workflow and produced docs/schemas/validation_run_report.json showing all checks passed (overall_status: pass, passed_checks: 9, failed_checks: 0).
  • OPA policy unit tests executed with opa test and reported PASS: 4/4.
  • Python unit tests under docs/schemas/ (the test_*.py suite invoked by make governance-validator-test) were executed as part of the run and completed successfully according to the generated run report.

Codex Task

Summary by Sourcery

Introduce a governance artifact validation framework with machine-readable schemas, Rego policies, evidence manifests, and CI automation for the AGI/ASI governance blueprint.

New Features:

  • Add an enterprise and civilizational AGI/ASI governance blueprint report with linked machine-readable artifact inventory.
  • Provide JSON/YAML schemas, governance profile configuration, and compliance control mappings for 2026–2030 AI governance.
  • Introduce OPA/Rego governance policy and unit tests for AI risk tiering, prohibited use cases, and control gates.
  • Add evidence bundle generation, verification, and validation_run_report tooling to produce regulator-ready evidence manifests.
  • Expose a governance validation runner and artifact inventory validator to orchestrate checks and ensure repository artifacts match the blueprint inventory.
  • Add a Makefile and governance-focused README/CONTRIBUTING docs to standardize local validation workflows.

Enhancements:

  • Add comprehensive Python test suites for governance validators, evidence manifests, run report semantics, dependency checks, and artifact drift detection.
  • Configure pre-commit hooks and yamllint settings to enforce governance artifact quality in development workflows.

CI:

  • Add a governance-artifacts CI workflow to run validation, OPA tests, evidence bundle and run-report generation, and upload the machine-readable validation report on pushes and pull requests touching governance assets.

Summary by CodeRabbit

  • New Features

    • Added a comprehensive governance validation toolchain with automated checks and machine-readable run reports
    • Added evidence-bundle generation and verification tooling
    • Added local pre-commit checks to run governance validations
  • Documentation

    • Added governance profile, control-mapping and run-report schemas and guides
    • Expanded enterprise governance blueprint and contributing/README docs
  • Chores

    • Integrated governance validation into CI and added Make targets and YAML linting configuration

@vercel

vercel Bot commented Apr 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-one-fine-starstuff-github-io Ready Ready Preview, Comment, Open in v0 Apr 27, 2026 7:24am

@code-genius-code-coverage

Copy link
Copy Markdown

The files' contents are under analysis for test generation.

@semanticdiff-com

semanticdiff-com Bot commented Apr 27, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  artifacts/schemas/kacg-openapi.yaml  100% smaller
  artifacts/templates/github-actions-governance.yaml  100% smaller
  backend/middleware/auth.js  100% smaller
  backend/package.json  100% smaller
  backend/routes/auth.js  100% smaller
  backend/server.js  100% smaller
  backend/utils/encryption.js  100% smaller
  backend/utils/logger.js  100% smaller
  backend/utils/validation.js  100% smaller
  demo_audit.json  100% smaller
  frontend/package.json  100% smaller
  frontend/src/App.tsx  100% smaller
  frontend/src/api/client.ts  100% smaller
  frontend/src/crypto/cryptoManager.ts  100% smaller
  frontend/src/index.css  100% smaller
  frontend/src/store/authStore.ts  100% smaller
  frontend/tsconfig.json  100% smaller
  index.html  100% smaller
  next-app/app/docs/exec-overlay/action-brief/page.tsx  100% smaller
  next-app/app/docs/exec-overlay/board-pack/page.tsx  100% smaller
  next-app/app/docs/exec-overlay/executive-summary/page.tsx  100% smaller
  next-app/app/docs/exec-overlay/slides/assessment/page.tsx  100% smaller
  next-app/app/docs/exec-overlay/slides/page.tsx  100% smaller
  next-app/app/docs/exec-overlay/slides/script-dry-run/page.tsx  100% smaller
  next-app/app/docs/exec-overlay/slides/script-expanded/page.tsx  100% smaller
  next-app/app/docs/exec-overlay/slides/script-hybrid/page.tsx  100% smaller
  next-app/app/docs/exec-overlay/slides/script/page.tsx  100% smaller
  rag-agentic-dashboard/data/civ-ai-gov-6l-crs.json  100% smaller
  rag-agentic-dashboard/data/civ-ai-gov-stack.json  100% smaller
  rag-agentic-dashboard/data/ent-ai-gov-blueprint.json  100% smaller
  rag-agentic-dashboard/data/prompt-eng-guide.json  100% smaller
  rag-agentic-dashboard/data/sentinel-ai-v24.json  100% smaller
  rag-agentic-dashboard/data/workflowai-pro.json  100% smaller
  rag-agentic-dashboard/public/ai-safety-report.html  100% smaller
  rag-agentic-dashboard/public/civ-ai-gov-6l-crs.html  100% smaller
  rag-agentic-dashboard/public/civ-ai-gov-stack.html  100% smaller
  rag-agentic-dashboard/public/governance-hub.html  100% smaller
  rag-agentic-dashboard/public/index.html  100% smaller
  rag-agentic-dashboard/public/unified-master-reference.html  100% smaller
  rag-agentic-dashboard/public/veridical-week10.html  100% smaller
  rag-agentic-dashboard/public/veridical-week11.html  100% smaller
  rag-agentic-dashboard/public/veridical-week12.html  100% smaller
  rag-agentic-dashboard/public/veridical-week6.html  100% smaller
  rag-agentic-dashboard/public/veridical-week7.html  100% smaller
  rag-agentic-dashboard/public/veridical.html  100% smaller
  report_template.html  100% smaller
  styles.css  100% smaller
  backend/models/User.js  95% smaller
  artifacts/templates/governance-verify-cli.py  93% smaller
  backend/utils/tokenBlacklist.js  89% smaller
  script.js  89% smaller
  backend/config/database.js  79% smaller
  .github/workflows/octopusdeploy.yml  63% smaller
  omni_sentinel_cli.py  1% smaller
  .github/ISSUE_TEMPLATE/bug_report.yml  0% smaller
  .github/workflows/cmake-single-platform.yml  0% smaller
  .github/workflows/datadog-synthetics.yml  0% smaller
  .github/workflows/go-ossf-slsa3-publish.yml  0% smaller
  .github/workflows/governance-artifacts-ci.yml  0% smaller
  .pre-commit-config.yaml  0% smaller
  .yamllint Unsupported file format
  ABSOLUTE_FINAL_STATUS.txt Unsupported file format
  CITATION.cff Unsupported file format
  COMPREHENSIVE_SECURITY_AUDIT_REPORT.md Unsupported file format
  DEPLOYMENT_COMPLETE_REPORT.md Unsupported file format
  DEPLOYMENT_GUIDE.md Unsupported file format
  DEPLOYMENT_INSTRUCTIONS_FINAL.md Unsupported file format
  DEPLOYMENT_STATUS_FINAL.md Unsupported file format
  DEPLOYMENT_SUMMARY.txt Unsupported file format
  ENTERPRISE_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md Unsupported file format
  EXECUTIVE_ONE_PAGE_SUMMARY.md Unsupported file format
  FILE_MANIFEST.txt Unsupported file format
  FINAL_COMPREHENSIVE_SUMMARY.txt Unsupported file format
  FINAL_DELIVERY_SUMMARY.txt Unsupported file format
  FINAL_DEPLOYMENT_INSTRUCTIONS.md Unsupported file format
  FINAL_EXECUTIVE_SUMMARY.md Unsupported file format
  FINAL_STATUS_REPORT.txt Unsupported file format
  FRAMEWORK_COMPLETION_SUMMARY.md Unsupported file format
  LIVE_PREVIEW_STATUS.md Unsupported file format
  LUMINOUS_ENGINE_CODEX_EXECUTIVE_SUMMARY.md Unsupported file format
  MANUAL_DEPLOYMENT_FINAL.md Unsupported file format
  Makefile Unsupported file format
  OMNI_SENTINEL_AI_COMPLIANCE_GOVERNANCE_REPORT.md Unsupported file format
  OMNI_SENTINEL_CLI_DOCUMENTATION.md Unsupported file format
  OMNI_SENTINEL_CLI_EXECUTIVE_SUMMARY.md Unsupported file format
  OMNI_SENTINEL_COMPLETION_STATUS.md Unsupported file format
  OMNI_SENTINEL_DEPLOYMENT_STATUS.md Unsupported file format
  OMNI_SENTINEL_EXECUTIVE_ACTION_BRIEF.md Unsupported file format
  OMNI_SENTINEL_FINAL_SUMMARY.md Unsupported file format
  OMNI_SENTINEL_GOVERNANCE_REPORT.md Unsupported file format
  OMNI_SENTINEL_PROJECT_COMPLETION.md Unsupported file format
  OMNI_SENTINEL_TECHNICAL_BRIEF.md Unsupported file format
  PROJECT_COMPLETION_STATUS_FINAL.md Unsupported file format
  PROJECT_COMPLETION_SUMMARY.md Unsupported file format
  PULL_REQUEST_DESCRIPTION.md Unsupported file format
  QUICK_ACTION_GUIDE.md Unsupported file format
  QUICK_START.md Unsupported file format
  README.md Unsupported file format
  SECURITY_AUDIT_TECHNICAL_DELIVERABLES.md Unsupported file format
  SENTINEL_TRAJECTORY_CONTROL.md Unsupported file format
  THE_LUMINOUS_ENGINE_CODEX.md Unsupported file format
  agi-pipeline.py  0% smaller
  agi_pipeline.ipynb Unsupported file format
  cv_module.py  0% smaller
  docs/AGI_ASI_GOVERNANCE_MASTER_REFERENCE_2026_2030.md Unsupported file format
  docs/reports/AGI_ASI_GOVERNANCE_IMPLEMENTATION_ROADMAP.md Unsupported file format
  docs/reports/AGI_READINESS_SAFETY_FRAMEWORKS_WHITEPAPER.md Unsupported file format
  docs/reports/CIVILIZATION_SCALE_AI_GOVERNANCE_EDUCATION.md Unsupported file format
  docs/reports/COGNITIVE_RESONANCE_AGI_READINESS.md Unsupported file format
  docs/reports/ENTERPRISE_AI_ARCHITECTURE_SECURITY_WHITEPAPER.md Unsupported file format
  docs/reports/ENTERPRISE_AI_REFERENCE_ARCHITECTURES.md Unsupported file format
  docs/reports/ENTERPRISE_CIVILIZATIONAL_AGI_ASI_BLUEPRINT_2026_2030.md Unsupported file format
  docs/reports/GLOBAL_LEGAL_REGISTRY_API_FRAMEWORKS.md Unsupported file format
  docs/reports/GSIFI_AGI_ASI_GOVERNANCE_PRACTITIONER_GUIDE.md Unsupported file format
  docs/reports/GSIFI_AI_GOVERNANCE_REGULATORY_COMPLIANCE_WHITEPAPER.md Unsupported file format
  docs/reports/KARDASHEV_ENERGY_COMPUTE_GOVERNANCE_WHITEPAPER.md Unsupported file format
  docs/reports/PRACTITIONER_MASTER_REFERENCE_AI_GOVERNANCE.md Unsupported file format
  docs/reports/TRAJECTORY_AI_SENTINEL_GOVERNANCE.md Unsupported file format
  docs/reports/quarterly_kardashev_q1_2026.md Unsupported file format
  docs/schemas/CONTRIBUTING.md Unsupported file format
  docs/schemas/README.md Unsupported file format
  docs/schemas/_validation_deps.py  0% smaller
  docs/schemas/agi_asi_governance_profile.schema.json  0% smaller
  docs/schemas/agi_asi_governance_profile_2026_2030.yaml  0% smaller
  docs/schemas/check_dependencies.py  0% smaller
  docs/schemas/check_generated_artifacts.py  0% smaller
  docs/schemas/compliance_control_mapping.json  0% smaller
  docs/schemas/compliance_control_mapping.schema.json  0% smaller
  docs/schemas/evidence_bundle_manifest.json  0% smaller
  docs/schemas/evidence_bundle_manifest.schema.json  0% smaller
  docs/schemas/generate_evidence_bundle.py  0% smaller
  docs/schemas/governance_artifacts_validation.py  0% smaller
  docs/schemas/policies/ai_governance.rego Unsupported file format
  docs/schemas/policies/ai_governance_test.rego Unsupported file format
  docs/schemas/requirements-governance.txt Unsupported file format
  docs/schemas/run_governance_checks.py  0% smaller
  docs/schemas/test_check_dependencies.py  0% smaller
  docs/schemas/test_check_generated_artifacts.py  0% smaller
  docs/schemas/test_generate_evidence_bundle.py  0% smaller
  docs/schemas/test_governance_artifacts_validation.py  0% smaller
  docs/schemas/test_run_governance_checks.py  0% smaller
  docs/schemas/test_validate_artifact_inventory.py  0% smaller
  docs/schemas/test_validate_evidence_manifest.py  0% smaller
  docs/schemas/test_validate_run_report.py  0% smaller
  docs/schemas/test_validation_deps.py  0% smaller
  docs/schemas/test_verify_evidence_bundle.py  0% smaller
  docs/schemas/testdata/invalid_control_bad_domain.json  0% smaller
  docs/schemas/testdata/invalid_profile_missing_framework.yaml  0% smaller
  docs/schemas/validate_artifact_inventory.py  0% smaller
  docs/schemas/validate_evidence_manifest.py  0% smaller
  docs/schemas/validate_run_report.py  0% smaller
  docs/schemas/validation_run_report.json  0% smaller
  docs/schemas/validation_run_report.schema.json  0% smaller
  docs/schemas/verify_evidence_bundle.py  0% smaller
  frontend/nginx-site.conf Unsupported file format
  frontend/nginx.conf Unsupported file format
  governance-framework.patch Unsupported file format
  next-app/app/docs/exec-overlay/board-handout/page.tsx Unsupported file format
  nlp_module.py  0% smaller

@gitnotebooks

gitnotebooks Bot commented Apr 27, 2026

Copy link
Copy Markdown

@sourcery-ai

sourcery-ai Bot commented Apr 27, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a governance artifact validation pipeline (Make targets, Python tooling, Rego policies, schemas, tests, and GitHub Actions CI) for the 2026–2030 AGI/ASI governance blueprint, plus a deterministically generated evidence manifest and validation run report used for regulator-ready audit artifacts.

Sequence diagram for governance validation run report generation

sequenceDiagram
  actor Dev
  participant GHA as GitHubActions
  participant Make as Makefile
  participant RunChecks as run_governance_checks.py
  participant Cmds as Make_governance_targets
  participant Report as validation_run_report.json

  Dev->>GHA: Push or open PR touching governance files
  GHA->>Make: Invoke target governance-report
  Make->>RunChecks: python docs/schemas/run_governance_checks.py

  RunChecks->>RunChecks: Load default command list
  RunChecks->>Cmds: Execute make governance-validate
  Cmds-->>RunChecks: Status, stdout, stderr
  RunChecks->>RunChecks: Sanitize and tail output
  RunChecks->>Cmds: Execute make governance-artifact-inventory
  Cmds-->>RunChecks: Status, stdout, stderr
  RunChecks->>RunChecks: Append check result
  RunChecks->>Cmds: Execute remaining governance-* commands
  Cmds-->>RunChecks: Status, stdout, stderr per command
  RunChecks->>RunChecks: Compute passed_checks / failed_checks

  RunChecks->>Report: Write JSON report with checks, overall_status
  RunChecks-->>Make: Exit code based on overall_status
  Make-->>GHA: Target governance-report completed
  GHA->>GHA: Later validate report and upload artifact
Loading

Class diagram for governance validation Python tooling

classDiagram
  class governance_artifacts_validation_py {
    +DEFAULT_YAML
    +DEFAULT_JSON
    +DEFAULT_YAML_SCHEMA
    +DEFAULT_JSON_SCHEMA
    +EXPECTED_FRAMEWORK_KEYS
    +EXPECTED_CANONICAL_DOMAINS
    +fail(msg)
    +load_json(path)
    +load_yaml(path)
    +validate_schema(instance, schema, label)
    +semantic_checks(yaml_doc, json_doc)
    +parse_args()
    +main()
  }

  class run_governance_checks_py {
    +REPO_ROOT
    +DEFAULT_COMMANDS
    +parse_args()
    +sanitize_output(text, repo_root)
    +normalize_nondeterministic_text(text)
    +tail_with_marker(text, max_chars)
    +main()
  }

  class generate_evidence_bundle_py {
    +DEFAULT_ARTIFACTS
    +sha256_file(path)
    +parse_args()
    +main()
  }

  class verify_evidence_bundle_py {
    +sha256_file(path)
    +parse_args()
    +main()
  }

  class validate_evidence_manifest_py {
    +parse_args()
    +load_json(path)
    +fail(msg)
    +main()
  }

  class validate_run_report_py {
    +fail(msg)
    +parse_args()
    +load_json(path)
    +validate_summary_counts(report)
    +main()
  }

  class validate_artifact_inventory_py {
    +DEFAULT_REPORT
    +DEFAULT_REPO_ROOT
    +INVENTORY_HEADING_PATTERNS
    +PATH_PATTERN
    +parse_args()
    +extract_inventory_section(report_text)
    +collect_inventory_paths(inventory_text)
    +find_duplicate_paths(paths)
    +validate_inventory_paths(paths, repo_root)
    +main()
  }

  class check_dependencies_py {
    +DEFAULT_MODULES
    +REPO_ROOT
    +DEFAULT_REQUIREMENTS
    +parse_args()
    +main()
  }

  class check_generated_artifacts_py {
    +sha256_file(path)
    +run(cmd, cwd)
    +main()
  }

  class validation_deps_py {
    +INSTALL_HINT
    +require_jsonschema()
  }

  governance_artifacts_validation_py --> validation_deps_py : uses
  validate_evidence_manifest_py --> validation_deps_py : uses
  validate_run_report_py --> validation_deps_py : uses

  run_governance_checks_py --> check_dependencies_py : indirect via Make
  run_governance_checks_py --> governance_artifacts_validation_py : via make governance-validate
  run_governance_checks_py --> validate_artifact_inventory_py : via make governance-artifact-inventory
  run_governance_checks_py --> generate_evidence_bundle_py : via make governance-evidence-manifest
  run_governance_checks_py --> verify_evidence_bundle_py : via make governance-evidence-verify
  run_governance_checks_py --> validate_evidence_manifest_py : via make governance-evidence-schema
  run_governance_checks_py --> validate_run_report_py : via make governance-report-schema
  run_governance_checks_py --> check_generated_artifacts_py : via make governance-check-generated
Loading

File-Level Changes

Change Details Files
Introduce a deterministic governance validation runner and report format for all governance checks.
  • Add CLI script that runs a default sequence of Make-based governance commands, with timeout handling, tail truncation, repo-root redaction, and optional timestamps, emitting a JSON run report.
  • Define JSON Schema and validator for the run-report structure, including semantic checks on passed/failed counts and overall_status consistency.
  • Add unit tests to cover custom command lists, fail-fast vs continue-on-failure behavior, timeout paths, output normalization, and schema/semantic validation paths.
docs/schemas/run_governance_checks.py
docs/schemas/validation_run_report.schema.json
docs/schemas/validation_run_report.json
docs/schemas/validate_run_report.py
docs/schemas/test_run_governance_checks.py
docs/schemas/test_validate_run_report.py
Add governance artifact schema + semantic validation, including crosswalk and canonical domain checks.
  • Implement a Python validator that loads the governance profile YAML and control mapping JSON, validates them against their JSON Schemas via shared jsonschema helpers, and enforces semantic checks (risk tier coverage, framework keys, domain coverage, control uniqueness).
  • Define the 2026–2030 governance profile YAML and control mapping artifacts plus their schemas (not fully shown in diff) to encode regulatory crosswalks and canonical control domains.
  • Add positive and negative unit tests to exercise the validator CLI, missing-framework and invalid-domain scenarios, and JSONSchema integration behavior.
docs/schemas/governance_artifacts_validation.py
docs/schemas/agi_asi_governance_profile_2026_2030.yaml
docs/schemas/agi_asi_governance_profile.schema.json
docs/schemas/compliance_control_mapping.json
docs/schemas/compliance_control_mapping.schema.json
docs/schemas/test_governance_artifacts_validation.py
docs/schemas/testdata/invalid_profile_missing_framework.yaml
docs/schemas/testdata/invalid_control_bad_domain.json
Create evidence bundle manifest generation, verification, and schema validation to support regulator-ready evidence bundles.
  • Add deterministic generator that computes SHA-256 and size metadata for a curated set of governance artifacts into a JSON evidence manifest, with optional timestamp inclusion.
  • Implement a verifier that re-hashes/size-checks artifacts against the manifest to detect tampering or drift, and a schema validator that enforces manifest structure via jsonschema.
  • Add unit tests for manifest generation determinism, optional timestamps, verification success, tamper detection, and schema validation failures.
docs/schemas/generate_evidence_bundle.py
docs/schemas/verify_evidence_bundle.py
docs/schemas/evidence_bundle_manifest.json
docs/schemas/evidence_bundle_manifest.schema.json
docs/schemas/validate_evidence_manifest.py
docs/schemas/test_generate_evidence_bundle.py
docs/schemas/test_verify_evidence_bundle.py
docs/schemas/test_validate_evidence_manifest.py
Enforce artifact inventory consistency between the narrative blueprint and on-disk files, and ensure generated artifacts remain up to date.
  • Add a markdown blueprint document with a machine-readable artifact inventory section listing all governance-related artifacts.
  • Add a validator that parses the inventory section, extracts relative paths, rejects duplicates, and ensures each path exists relative to the repo root.
  • Introduce a checker that regenerates evidence manifests into a temp location and compares hashes against tracked outputs to flag stale generated artifacts; include unit tests for inventory parsing, duplicate detection, missing path detection, and generator failure handling.
docs/reports/ENTERPRISE_CIVILIZATIONAL_AGI_ASI_BLUEPRINT_2026_2030.md
docs/schemas/validate_artifact_inventory.py
docs/schemas/test_validate_artifact_inventory.py
docs/schemas/check_generated_artifacts.py
docs/schemas/test_check_generated_artifacts.py
Add shared validation dependencies helper and Python dependency preflight checker to standardize jsonschema/pyyaml requirements.
  • Provide a central helper that loads jsonschema.Draft202012Validator and emits consistent install hints when missing.
  • Add a CLI tool that checks required Python modules (default yaml/jsonschema), deduplicates module names, formats pip-install hints with $REPO_ROOT-relative requirement paths, and fails on missing modules.
  • Add tests to ensure consistent error messages, trimming/deduplication behavior, sorted missing-module reporting, and correct handling of relative vs absolute requirements paths.
docs/schemas/_validation_deps.py
docs/schemas/check_dependencies.py
docs/schemas/test_validation_deps.py
docs/schemas/test_check_dependencies.py
Integrate OPA/Rego governance policy and tests to enforce runtime control gates.
  • Define a Rego policy that evaluates allow/deny based on risk tier, prohibited use cases, required document presence, independent validation/challenger coverage, human oversight requirements, and runtime resilience controls.
  • Add unit tests using OPA’s test runner to cover allowed L2 cases, prohibited use-case denial, missing artifacts, and weak challenger coverage.
docs/schemas/policies/ai_governance.rego
docs/schemas/policies/ai_governance_test.rego
Wire the governance validation suite into Make, GitHub Actions, and local/pre-commit workflows, and document usage.
  • Add Make targets to orchestrate dependency checks, linting, schema/semantic validation, artifact inventory validation, policy tests, Python test suites, evidence manifest generation/verification, run report generation/validation, and generated-artifact freshness checks.
  • Create a GitHub Actions workflow that sets up Python + OPA, runs the full governance validation chain via Make, and uploads the validation run report as an artifact.
  • Add pre-commit hooks and yamllint configuration to run governance validation and policy tests locally, and add README/CONTRIBUTING docs describing local workflows and deterministic evidence/report behavior.
Makefile
.github/workflows/governance-artifacts-ci.yml
.pre-commit-config.yaml
docs/schemas/README.md
docs/schemas/CONTRIBUTING.md
.yamllint
docs/schemas/requirements-governance.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d9c4a94-eada-426e-b576-42e391fcc574

📥 Commits

Reviewing files that changed from the base of the PR and between efe3bc8 and 0573db2.

📒 Files selected for processing (122)
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/workflows/cmake-single-platform.yml
  • .github/workflows/datadog-synthetics.yml
  • .github/workflows/go-ossf-slsa3-publish.yml
  • .github/workflows/octopusdeploy.yml
  • ABSOLUTE_FINAL_STATUS.txt
  • CITATION.cff
  • COMPREHENSIVE_SECURITY_AUDIT_REPORT.md
  • DEPLOYMENT_COMPLETE_REPORT.md
  • DEPLOYMENT_GUIDE.md
  • DEPLOYMENT_INSTRUCTIONS_FINAL.md
  • DEPLOYMENT_STATUS_FINAL.md
  • DEPLOYMENT_SUMMARY.txt
  • ENTERPRISE_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md
  • EXECUTIVE_ONE_PAGE_SUMMARY.md
  • FILE_MANIFEST.txt
  • FINAL_COMPREHENSIVE_SUMMARY.txt
  • FINAL_DELIVERY_SUMMARY.txt
  • FINAL_DEPLOYMENT_INSTRUCTIONS.md
  • FINAL_EXECUTIVE_SUMMARY.md
  • FINAL_STATUS_REPORT.txt
  • FRAMEWORK_COMPLETION_SUMMARY.md
  • LIVE_PREVIEW_STATUS.md
  • LUMINOUS_ENGINE_CODEX_EXECUTIVE_SUMMARY.md
  • MANUAL_DEPLOYMENT_FINAL.md
  • OMNI_SENTINEL_AI_COMPLIANCE_GOVERNANCE_REPORT.md
  • OMNI_SENTINEL_CLI_DOCUMENTATION.md
  • OMNI_SENTINEL_CLI_EXECUTIVE_SUMMARY.md
  • OMNI_SENTINEL_COMPLETION_STATUS.md
  • OMNI_SENTINEL_DEPLOYMENT_STATUS.md
  • OMNI_SENTINEL_EXECUTIVE_ACTION_BRIEF.md
  • OMNI_SENTINEL_FINAL_SUMMARY.md
  • OMNI_SENTINEL_GOVERNANCE_REPORT.md
  • OMNI_SENTINEL_PROJECT_COMPLETION.md
  • OMNI_SENTINEL_TECHNICAL_BRIEF.md
  • PROJECT_COMPLETION_STATUS_FINAL.md
  • PROJECT_COMPLETION_SUMMARY.md
  • PULL_REQUEST_DESCRIPTION.md
  • QUICK_ACTION_GUIDE.md
  • QUICK_START.md
  • README.md
  • SECURITY_AUDIT_TECHNICAL_DELIVERABLES.md
  • SENTINEL_TRAJECTORY_CONTROL.md
  • THE_LUMINOUS_ENGINE_CODEX.md
  • agi-pipeline.py
  • agi_pipeline.ipynb
  • artifacts/schemas/kacg-openapi.yaml
  • artifacts/templates/github-actions-governance.yaml
  • artifacts/templates/governance-verify-cli.py
  • backend/config/database.js
  • backend/middleware/auth.js
  • backend/models/User.js
  • backend/package.json
  • backend/routes/auth.js
  • backend/server.js
  • backend/utils/encryption.js
  • backend/utils/logger.js
  • backend/utils/tokenBlacklist.js
  • backend/utils/validation.js
  • cv_module.py
  • demo_audit.json
  • docs/AGI_ASI_GOVERNANCE_MASTER_REFERENCE_2026_2030.md
  • docs/reports/AGI_ASI_GOVERNANCE_IMPLEMENTATION_ROADMAP.md
  • docs/reports/AGI_READINESS_SAFETY_FRAMEWORKS_WHITEPAPER.md
  • docs/reports/CIVILIZATION_SCALE_AI_GOVERNANCE_EDUCATION.md
  • docs/reports/COGNITIVE_RESONANCE_AGI_READINESS.md
  • docs/reports/ENTERPRISE_AI_ARCHITECTURE_SECURITY_WHITEPAPER.md
  • docs/reports/ENTERPRISE_AI_REFERENCE_ARCHITECTURES.md
  • docs/reports/ENTERPRISE_CIVILIZATIONAL_AGI_ASI_BLUEPRINT_2026_2030.md
  • docs/reports/GLOBAL_LEGAL_REGISTRY_API_FRAMEWORKS.md
  • docs/reports/GSIFI_AGI_ASI_GOVERNANCE_PRACTITIONER_GUIDE.md
  • docs/reports/GSIFI_AI_GOVERNANCE_REGULATORY_COMPLIANCE_WHITEPAPER.md
  • docs/reports/KARDASHEV_ENERGY_COMPUTE_GOVERNANCE_WHITEPAPER.md
  • docs/reports/PRACTITIONER_MASTER_REFERENCE_AI_GOVERNANCE.md
  • docs/reports/TRAJECTORY_AI_SENTINEL_GOVERNANCE.md
  • docs/reports/quarterly_kardashev_q1_2026.md
  • docs/schemas/_validation_deps.py
  • docs/schemas/test_validation_deps.py
  • frontend/nginx-site.conf
  • frontend/nginx.conf
  • frontend/package.json
  • frontend/src/App.tsx
  • frontend/src/api/client.ts
  • frontend/src/crypto/cryptoManager.ts
  • frontend/src/index.css
  • frontend/src/store/authStore.ts
  • frontend/tsconfig.json
  • governance-framework.patch
  • index.html
  • next-app/app/docs/exec-overlay/action-brief/page.tsx
  • next-app/app/docs/exec-overlay/board-handout/page.tsx
  • next-app/app/docs/exec-overlay/board-pack/page.tsx
  • next-app/app/docs/exec-overlay/executive-summary/page.tsx
  • next-app/app/docs/exec-overlay/slides/assessment/page.tsx
  • next-app/app/docs/exec-overlay/slides/page.tsx
  • next-app/app/docs/exec-overlay/slides/script-dry-run/page.tsx
  • next-app/app/docs/exec-overlay/slides/script-expanded/page.tsx
  • next-app/app/docs/exec-overlay/slides/script-hybrid/page.tsx
  • next-app/app/docs/exec-overlay/slides/script/page.tsx
  • nlp_module.py
  • omni_sentinel_cli.py
  • rag-agentic-dashboard/data/civ-ai-gov-6l-crs.json
  • rag-agentic-dashboard/data/civ-ai-gov-stack.json
  • rag-agentic-dashboard/data/ent-ai-gov-blueprint.json
  • rag-agentic-dashboard/data/prompt-eng-guide.json
  • rag-agentic-dashboard/data/sentinel-ai-v24.json
  • rag-agentic-dashboard/data/workflowai-pro.json
  • rag-agentic-dashboard/public/ai-safety-report.html
  • rag-agentic-dashboard/public/civ-ai-gov-6l-crs.html
  • rag-agentic-dashboard/public/civ-ai-gov-stack.html
  • rag-agentic-dashboard/public/governance-hub.html
  • rag-agentic-dashboard/public/index.html
  • rag-agentic-dashboard/public/unified-master-reference.html
  • rag-agentic-dashboard/public/veridical-week10.html
  • rag-agentic-dashboard/public/veridical-week11.html
  • rag-agentic-dashboard/public/veridical-week12.html
  • rag-agentic-dashboard/public/veridical-week6.html
  • rag-agentic-dashboard/public/veridical-week7.html
  • rag-agentic-dashboard/public/veridical.html
  • report_template.html
  • script.js
  • styles.css

📝 Walkthrough

Walkthrough

Adds a governance validation toolchain: CI workflow, pre-commit hooks, Make targets, JSON/YAML schemas, Rego policies, Python validators/generators/verifiers, evidence manifest tooling, and comprehensive unit/integration tests with documentation and sample run reports.

Changes

Cohort / File(s) Summary
CI & Pre-commit
\.github/workflows/governance-artifacts-ci.yml, \.pre-commit-config.yaml, \.yamllint
New workflow trigger/steps for governance validation, pinned OPA install, Python 3.12 setup, artifact uploads; added pre-commit hooks and yamllint profile.
Make / Automation
Makefile
Many new governance-focused targets (setup, deps-check, lint, validate, policy tests, evidence generation/verify, report generation/validation, artifact checks).
Governance Profiles & Control Mapping
docs/schemas/agi_asi_governance_profile.schema.json, docs/schemas/agi_asi_governance_profile_2026_2030.yaml, docs/schemas/compliance_control_mapping.json, docs/schemas/compliance_control_mapping.schema.json
New profile schema and YAML profile plus canonical control mapping and its schema defining domains, controls, overlays and thresholds.
Evidence Bundle & Manifest
docs/schemas/evidence_bundle_manifest.json, docs/schemas/evidence_bundle_manifest.schema.json, docs/schemas/generate_evidence_bundle.py, docs/schemas/verify_evidence_bundle.py
Creates deterministic evidence bundle manifest generation and verification with SHA-256/size checks.
Validators & Inventory Checks
docs/schemas/governance_artifacts_validation.py, docs/schemas/validate_evidence_manifest.py, docs/schemas/validate_run_report.py, docs/schemas/validate_artifact_inventory.py
New CLI validators enforcing schema + semantic constraints for artifacts, manifests, run reports, and report-listed inventory paths.
Orchestration CLI & Helpers
docs/schemas/run_governance_checks.py, docs/schemas/check_dependencies.py, docs/schemas/check_generated_artifacts.py, docs/schemas/_validation_deps.py, docs/schemas/requirements-governance.txt
Runner for orchestrated make/validation commands (timeouts, tails, redaction), dependency checks with install hints, generated-artifact staleness checker, and pinned requirements.
Policy-as-code
docs/schemas/policies/ai_governance.rego, docs/schemas/policies/ai_governance_test.rego
OPA policy implementing gate/artefact/oversight rules and accompanying Rego tests.
Tests & Fixtures
docs/schemas/test_*.py, docs/schemas/testdata/*
Comprehensive unittest modules covering dependency checks, generators, validators, CLI orchestration, semantic edge cases, and test fixtures for negative scenarios.
Docs & Contribution
docs/reports/ENTERPRISE_CIVILIZATIONAL_AGI_ASI_BLUEPRINT_2026_2030.md, docs/schemas/README.md, docs/schemas/CONTRIBUTING.md
Adds extensive blueprint, contributing guide, and how-to for running/validating governance artifacts locally and in CI.
Validation Run Report
docs/schemas/validation_run_report.json, docs/schemas/validation_run_report.schema.json
Adds machine-readable sample run report and corresponding schema describing per-check statuses, tails, timeouts, and aggregates.
Whitespace & Minor
many miscellaneous files across repo (docs, frontend, backend, dashboards)
Numerous whitespace/EOF/newline normalization edits; minor formatting-only changes across many files.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant Make as Make (targets)
  participant Py as Python Validators/Generators
  participant OPA as OPA (rego)
  participant Art as Artifact Storage / Actions Upload

  GH->>Make: checkout & setup (python3.12, deps)
  GH->>OPA: install OPA v1.15.2
  Make->>Py: run schema linting & validation scripts
  Py->>OPA: run policy tests / evaluate rego
  Py->>Art: produce validation_run_report.json & evidence manifest
  OPA->>Make: return policy test results
  Make->>GH: return job status
  GH->>Art: upload reports & artifacts
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

enhancement, Tests, Review effort [1-5]: 5

Suggested reviewers

  • gstraccini
  • reviewabot

Poem

🐇🌿 I hopped through schemas, checks, and logs,
I counted hashes in the quiet fogs,
Made manifests tidy, policies stout,
Validators sing and reports print out,
A carrot-coded cheer for governance done right!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/create-agi-governance-blueprint-for-2026-2030

@difflens

difflens Bot commented Apr 27, 2026

Copy link
Copy Markdown

View changes in DiffLens

@difflens

difflens Bot commented Apr 27, 2026

Copy link
Copy Markdown

View changes in DiffLens

@penify-dev

penify-dev Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

@sourcery-ai sourcery-ai 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.

New security issues found

Comment thread docs/schemas/check_generated_artifacts.py
Comment thread docs/schemas/run_governance_checks.py
Comment thread docs/schemas/run_governance_checks.py
Comment thread docs/schemas/test_check_dependencies.py
Comment thread docs/schemas/test_check_generated_artifacts.py
Comment thread docs/schemas/test_validate_run_report.py
Comment thread docs/schemas/test_verify_evidence_bundle.py
Comment thread docs/schemas/test_verify_evidence_bundle.py
Comment thread docs/schemas/test_verify_evidence_bundle.py
Comment thread docs/schemas/test_verify_evidence_bundle.py
@codacy-production

codacy-production Bot commented Apr 27, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 critical · 36 high · 15 medium · 47 minor

Alerts:
⚠ 100 issues (≤ 0 issues of at least minor severity)

Results:
100 new issues

Category Results
Compatibility 9 medium
Documentation 12 minor
ErrorProne 1 medium
12 high
Security 24 high
CodeStyle 32 minor
Complexity 3 minor
2 critical
5 medium

View in Codacy

🟢 Metrics 192 complexity · 59 duplication

Metric Results
Complexity 192
Duplication 59

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sourcery-ai sourcery-ai 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.

Hey - I've found 25 security issues, 3 other issues, and left some high level feedback:

Security issues:

  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)
  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)

General comments:

  • The governance-related scripts (e.g., generate_evidence_bundle.py, verify_evidence_bundle.py, validate_evidence_manifest.py, validate_run_report.py, check_generated_artifacts.py) each reimplement small utilities like sha256_file, JSON loading, and failure handling; consider extracting these into a shared helper module to reduce duplication and keep behavior consistent.
  • check_generated_artifacts.py currently only verifies evidence_bundle_manifest.json; if validation_run_report.json is expected to be committed and deterministic, it would be helpful to include it in the stale-generated check as well so drift in either artifact is consistently caught.
  • Several CLIs take both --repo-root and relative paths (e.g., validate_evidence_manifest.py, validate_run_report.py, validate_artifact_inventory.py); aligning their path resolution semantics (e.g., always resolving arguments relative to repo-root) and documenting this behavior would make them easier to reason about and less error-prone when used in other pipelines.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The governance-related scripts (e.g., generate_evidence_bundle.py, verify_evidence_bundle.py, validate_evidence_manifest.py, validate_run_report.py, check_generated_artifacts.py) each reimplement small utilities like sha256_file, JSON loading, and failure handling; consider extracting these into a shared helper module to reduce duplication and keep behavior consistent.
- check_generated_artifacts.py currently only verifies evidence_bundle_manifest.json; if validation_run_report.json is expected to be committed and deterministic, it would be helpful to include it in the stale-generated check as well so drift in either artifact is consistently caught.
- Several CLIs take both --repo-root and relative paths (e.g., validate_evidence_manifest.py, validate_run_report.py, validate_artifact_inventory.py); aligning their path resolution semantics (e.g., always resolving arguments relative to repo-root) and documenting this behavior would make them easier to reason about and less error-prone when used in other pipelines.

## Individual Comments

### Comment 1
<location path="docs/schemas/test_run_governance_checks.py" line_range="17" />
<code_context>
+SPEC.loader.exec_module(MODULE)
+
+
+class RunGovernanceChecksTests(unittest.TestCase):
+    def test_default_commands_include_post_generation_checks(self):
+        self.assertIn("make --no-print-directory governance-artifact-inventory", MODULE.DEFAULT_COMMANDS)
</code_context>
<issue_to_address>
**suggestion (testing):** Add a test that exercises the --include-timestamp flag and asserts the timestamp field is present.

The `run_governance_checks.py` script already supports an `--include-timestamp` flag that adds a `generated_at_utc` field, but no tests cover this path. Please add a test that runs the script with `--include-timestamp`, loads the JSON output, and asserts that `generated_at_utc` is present and non-empty while the rest of the report structure (e.g., checks, overall_status) remains unchanged. This helps catch regressions where the flag stops working or the field name changes.

Suggested implementation:

```python
class RunGovernanceChecksTests(unittest.TestCase):
    def test_default_commands_include_post_generation_checks(self):
        self.assertIn("make --no-print-directory governance-artifact-inventory", MODULE.DEFAULT_COMMANDS)
        self.assertIn("make --no-print-directory governance-report-schema", MODULE.DEFAULT_COMMANDS)
        self.assertIn("make --no-print-directory governance-check-generated", MODULE.DEFAULT_COMMANDS)

    def test_include_timestamp_adds_generated_at_utc_field(self):
        with tempfile.TemporaryDirectory() as td:
            out = Path(td) / "report.json"
            proc = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--include-timestamp",
                    "--output",
                    str(out),
                ],
                check=True,
            )

            with out.open() as fh:
                report = json.load(fh)

            # Ensure generated_at_utc is present and non-empty
            self.assertIn("generated_at_utc", report)
            self.assertTrue(report["generated_at_utc"])

            # Ensure core structure is unchanged compared to a run without the flag
            out_no_ts = Path(td) / "report_no_ts.json"
            proc_no_ts = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--output",
                    str(out_no_ts),
                ],
                check=True,
            )

            with out_no_ts.open() as fh:
                report_no_ts = json.load(fh)

            for key in ("checks", "overall_status"):
                self.assertIn(key, report)
                self.assertIn(key, report_no_ts)
                self.assertEqual(report[key], report_no_ts[key])

    def test_report_redacts_absolute_repo_root(self):

```

1. Ensure the module imports `json`, `subprocess`, `sys`, and `tempfile` at the top of `docs/schemas/test_run_governance_checks.py` if they are not already imported.
2. The arguments passed to `run_governance_checks.py` in this new test (`--output`, `--include-timestamp`) should match the existing tests’ invocation style; if the script uses different flags (e.g. a positional output path or a different flag name), update the subprocess argument lists accordingly to stay consistent with the rest of the file.
</issue_to_address>

### Comment 2
<location path="docs/schemas/test_generate_evidence_bundle.py" line_range="12" />
<code_context>
+SCRIPT = ROOT / "generate_evidence_bundle.py"
+
+
+class EvidenceBundleTests(unittest.TestCase):
+    def run_generator(self, output_path: Path, include_timestamp: bool = False):
+        cmd = [sys.executable, str(SCRIPT), "--repo-root", str(ROOT.parent.parent), "--output", str(output_path)]
</code_context>
<issue_to_address>
**suggestion (testing):** Add a determinism test that compares two manifests generated without timestamps to ensure identical content.

Current tests cover structure and timestamp handling but not determinism of the default manifest. Please add a test that runs the generator twice without `--include-timestamp`, loads both JSON outputs, and asserts they are identical to catch any non-deterministic behavior in `DEFAULT_ARTIFACTS` or future changes.

Suggested implementation:

```python
import json
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path

```

```python
    def test_manifest_generation_deterministic_default(self):
        with tempfile.TemporaryDirectory() as td:
            out1 = Path(td) / "manifest1.json"
            out2 = Path(td) / "manifest2.json"

            result1 = self.run_generator(out1)
            self.assertEqual(result1.returncode, 0, msg=result1.stderr)
            self.assertTrue(out1.exists())

            result2 = self.run_generator(out2)
            self.assertEqual(result2.returncode, 0, msg=result2.stderr)
            self.assertTrue(out2.exists())

            with out1.open() as f1, out2.open() as f2:
                manifest1 = json.load(f1)
                manifest2 = json.load(f2)

            self.assertEqual(manifest1, manifest2)

```
</issue_to_address>

### Comment 3
<location path="docs/schemas/test_verify_evidence_bundle.py" line_range="13" />
<code_context>
+VERIFY = ROOT / "verify_evidence_bundle.py"
+
+
+class VerifyEvidenceBundleTests(unittest.TestCase):
+    def test_verify_manifest_success(self):
+        with tempfile.TemporaryDirectory() as td:
</code_context>
<issue_to_address>
**suggestion (testing):** Add a test case that covers missing or removed artifact files in the evidence bundle verification.

Current tests cover only the happy path and hash mismatches, but not the case where a manifest entry points to a missing artifact (`Missing artifact: ...`). Please extend `test_verify_manifest_detects_tamper` or add a new test that removes a file (or uses a non-existent path), runs `verify_evidence_bundle.py`, and asserts a non-zero exit code and a `Missing artifact:` message so this scenario is covered.

Suggested implementation:

```python
import sys
import tempfile
import unittest
import subprocess
from pathlib import Path

```

To implement the missing-artifact test case, you should add a new test method inside `VerifyEvidenceBundleTests`, e.g.:

```python
    def test_verify_manifest_missing_artifact(self):
        with tempfile.TemporaryDirectory() as td:
            manifest = Path(td) / "manifest.json"
            gen = subprocess.run(
                [sys.executable, str(GEN), "--repo-root", str(ROOT.parent.parent), "--output", str(manifest)],
                capture_output=True,
                text=True,
                check=False,
            )
            self.assertEqual(gen.returncode, 0, msg=gen.stderr)

            data = json.loads(manifest.read_text())
            # Assume manifest["artifacts"] is a list of objects with a "path" field
            missing_path = Path(td) / data["artifacts"][0]["path"]
            if missing_path.exists():
                missing_path.unlink()

            verify = subprocess.run(
                [sys.executable, str(VERIFY), "--manifest", str(manifest)],
                capture_output=True,
                text=True,
                check=False,
            )

            self.assertNotEqual(verify.returncode, 0)
            self.assertIn("Missing artifact:", verify.stderr)
```

You may need to:
1. Import `json` at the top of the file if not already imported.
2. Adjust the structure of `data` to match the actual manifest schema (e.g. `data["artifacts"][0]["artifact"]["path"]` or similar).
3. Ensure that `verify_evidence_bundle.py` prints `Missing artifact:` to stderr (or adjust the assertion to match the actual output stream and message).
4. If you prefer, you can fold this logic into an existing `test_verify_manifest_detects_tamper` by adding a sub-case or a separate removal/verification step, but a dedicated `test_verify_manifest_missing_artifact` keeps the scenarios clearer.
</issue_to_address>

### Comment 4
<location path="docs/schemas/check_generated_artifacts.py" line_range="21" />
<code_context>
    proc = subprocess.run(cmd, capture_output=True, text=True, check=False, cwd=cwd)
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 5
<location path="docs/schemas/run_governance_checks.py" line_range="81-89" />
<code_context>
            proc = subprocess.run(
                cmd,
                shell=True,
                capture_output=True,
                text=True,
                check=False,
                cwd=REPO_ROOT,
                timeout=args.timeout_seconds,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 6
<location path="docs/schemas/run_governance_checks.py" line_range="83" />
<code_context>
                shell=True,
</code_context>
<issue_to_address>
**security (python.lang.security.audit.subprocess-shell-true):** Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead.

```suggestion
                shell=False,
```

*Source: opengrep*
</issue_to_address>

### Comment 7
<location path="docs/schemas/test_check_dependencies.py" line_range="13" />
<code_context>
        return subprocess.run([sys.executable, str(SCRIPT), *args], capture_output=True, text=True, check=False)
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 8
<location path="docs/schemas/test_check_generated_artifacts.py" line_range="30-36" />
<code_context>
            proc = subprocess.run(
                [sys.executable, str(Path(module.__file__))],
                cwd=td,
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 9
<location path="docs/schemas/test_generate_evidence_bundle.py" line_range="17" />
<code_context>
        return subprocess.run(cmd, capture_output=True, text=True, check=False)
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 10
<location path="docs/schemas/test_governance_artifacts_validation.py" line_range="23-39" />
<code_context>
        return subprocess.run(
            [
                sys.executable,
                str(SCRIPT),
                "--yaml",
                str(yaml_path),
                "--json",
                str(json_path),
                "--yaml-schema",
                str(YAML_SCHEMA_PATH),
                "--json-schema",
                str(JSON_SCHEMA_PATH),
            ],
            capture_output=True,
            text=True,
            check=False,
        )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 11
<location path="docs/schemas/test_governance_artifacts_validation.py" line_range="42" />
<code_context>
        result = subprocess.run([sys.executable, str(SCRIPT), "--help"], capture_output=True, text=True, check=False)
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 12
<location path="docs/schemas/test_run_governance_checks.py" line_range="26-39" />
<code_context>
            proc = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--output",
                    str(out),
                    "--command",
                    "python -c \"import pathlib; print(pathlib.Path.cwd())\"",
                ],
                capture_output=True,
                text=True,
                check=False,
                cwd=td,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 13
<location path="docs/schemas/test_run_governance_checks.py" line_range="49-61" />
<code_context>
            proc = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--output",
                    str(out),
                    "--command",
                    "python -c \"import sys; sys.stderr.write(\'Ran 2 tests in 0.123s\\n\')\"",
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 14
<location path="docs/schemas/test_run_governance_checks.py" line_range="70-84" />
<code_context>
            proc = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--output",
                    str(out),
                    "--max-tail-chars",
                    "20",
                    "--command",
                    "python -c \"import sys; sys.stdout.write('x' * 120)\"",
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 15
<location path="docs/schemas/test_run_governance_checks.py" line_range="94-110" />
<code_context>
            proc = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--output",
                    str(out),
                    "--command",
                    "echo ok",
                    "--command",
                    "python -c \"print('done')\"",
                    "--max-tail-chars",
                    "20",
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 16
<location path="docs/schemas/test_run_governance_checks.py" line_range="123-137" />
<code_context>
            proc = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--output",
                    str(out),
                    "--timeout-seconds",
                    "1",
                    "--command",
                    "python -c \"import time; time.sleep(2)\"",
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 17
<location path="docs/schemas/test_run_governance_checks.py" line_range="149-164" />
<code_context>
            proc = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--output",
                    str(out),
                    "--continue-on-failure",
                    "--command",
                    "python -c \"import sys; sys.exit(1)\"",
                    "--command",
                    "echo should_run",
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 18
<location path="docs/schemas/test_run_governance_checks.py" line_range="177-191" />
<code_context>
            proc = subprocess.run(
                [
                    sys.executable,
                    str(RUN),
                    "--output",
                    str(out),
                    "--command",
                    "python -c \"import sys; sys.exit(1)\"",
                    "--command",
                    "echo should_not_run",
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 19
<location path="docs/schemas/test_validate_evidence_manifest.py" line_range="21-26" />
<code_context>
            gen = subprocess.run(
                [sys.executable, str(GEN), "--repo-root", str(ROOT.parent.parent), "--output", str(manifest)],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 20
<location path="docs/schemas/test_validate_evidence_manifest.py" line_range="29-43" />
<code_context>
            val = subprocess.run(
                [
                    sys.executable,
                    str(VALIDATE),
                    "--repo-root",
                    str(ROOT.parent.parent),
                    "--manifest",
                    str(manifest),
                    "--schema",
                    str(SCHEMA),
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 21
<location path="docs/schemas/test_validate_evidence_manifest.py" line_range="52-66" />
<code_context>
            val = subprocess.run(
                [
                    sys.executable,
                    str(VALIDATE),
                    "--repo-root",
                    str(ROOT.parent.parent),
                    "--manifest",
                    str(manifest),
                    "--schema",
                    str(SCHEMA),
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 22
<location path="docs/schemas/test_validate_evidence_manifest.py" line_range="71-85" />
<code_context>
        val = subprocess.run(
            [
                sys.executable,
                str(VALIDATE),
                "--repo-root",
                str(ROOT.parent.parent),
                "--manifest",
                "docs/schemas/does_not_exist.json",
                "--schema",
                str(SCHEMA),
            ],
            capture_output=True,
            text=True,
            check=False,
        )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 23
<location path="docs/schemas/test_validate_evidence_manifest.py" line_range="94-108" />
<code_context>
            val = subprocess.run(
                [
                    sys.executable,
                    str(VALIDATE),
                    "--repo-root",
                    str(ROOT.parent.parent),
                    "--manifest",
                    str(manifest),
                    "--schema",
                    str(SCHEMA),
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 24
<location path="docs/schemas/test_validate_run_report.py" line_range="37-51" />
<code_context>
            val = subprocess.run(
                [
                    sys.executable,
                    str(VALIDATE),
                    "--repo-root",
                    str(ROOT.parent.parent),
                    "--report",
                    str(report),
                    "--schema",
                    str(SCHEMA),
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 25
<location path="docs/schemas/test_validate_run_report.py" line_range="72-86" />
<code_context>
            val = subprocess.run(
                [
                    sys.executable,
                    str(VALIDATE),
                    "--repo-root",
                    str(ROOT.parent.parent),
                    "--report",
                    str(report),
                    "--schema",
                    str(SCHEMA),
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 26
<location path="docs/schemas/test_validate_run_report.py" line_range="109-123" />
<code_context>
            val = subprocess.run(
                [
                    sys.executable,
                    str(VALIDATE),
                    "--repo-root",
                    str(ROOT.parent.parent),
                    "--report",
                    str(report),
                    "--schema",
                    str(SCHEMA),
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 27
<location path="docs/schemas/test_validate_run_report.py" line_range="147-161" />
<code_context>
            val = subprocess.run(
                [
                    sys.executable,
                    str(VALIDATE),
                    "--repo-root",
                    str(ROOT.parent.parent),
                    "--report",
                    str(report),
                    "--schema",
                    str(SCHEMA),
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

### Comment 28
<location path="docs/schemas/test_validate_run_report.py" line_range="185-199" />
<code_context>
            val = subprocess.run(
                [
                    sys.executable,
                    str(VALIDATE),
                    "--repo-root",
                    str(ROOT.parent.parent),
                    "--report",
                    str(report),
                    "--schema",
                    str(SCHEMA),
                ],
                capture_output=True,
                text=True,
                check=False,
            )
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread docs/schemas/test_run_governance_checks.py
Comment thread docs/schemas/test_generate_evidence_bundle.py
Comment thread docs/schemas/test_verify_evidence_bundle.py
Comment thread docs/schemas/check_generated_artifacts.py
Comment thread docs/schemas/run_governance_checks.py
Comment thread docs/schemas/test_validate_run_report.py
Comment thread docs/schemas/test_validate_run_report.py
Comment thread docs/schemas/test_validate_run_report.py
Comment thread docs/schemas/test_validate_run_report.py
Comment thread docs/schemas/test_validate_run_report.py

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ec0ec28ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/schemas/run_governance_checks.py
Comment thread .github/workflows/governance-artifacts-ci.yml
@secure-code-warrior-for-github

Copy link
Copy Markdown

Micro-Learning Topic: OS command injection (Detected by phrase)

Matched on "command injection"

What is this? (2min video)

In many situations, applications will rely on OS provided functions, scripts, macros and utilities instead of reimplementing them in code. While functions would typically be accessed through a native interface library, the remaining three OS provided features will normally be invoked via the command line or launched as a process. If unsafe inputs are used to construct commands or arguments, it may allow arbitrary OS operations to be performed that can compromise the server.

Try a challenge in Secure Code Warrior

Helpful references
  • OWASP Command Injection - OWASP community page with comprehensive information about command injection, and links to various OWASP resources to help detect or prevent it.
  • OWASP testing for Command Injection - This article is focused on providing testing techniques for identifying command injection flaws in your applications

@netlify

netlify Bot commented Apr 27, 2026

Copy link
Copy Markdown

Deploy Preview for onefinestarstuff failed.

Name Link
🔨 Latest commit 0573db2
🔍 Latest deploy log https://app.netlify.com/projects/onefinestarstuff/deploys/69ef0f4375940f0008594c64

…26-2030

Signed-off-by: 𝐎𝐧𝐞 𝐅𝐢𝐧𝐞 𝐒𝐭𝐚𝐫𝐬𝐭𝐮𝐟𝐟 <onefinestarstuff@gmail.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@difflens

difflens Bot commented Apr 27, 2026

Copy link
Copy Markdown

View changes in DiffLens

1 similar comment
@difflens

difflens Bot commented Apr 27, 2026

Copy link
Copy Markdown

View changes in DiffLens

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @react-native/debugger-frontend is 96.0% likely obfuscated

Confidence: 0.96

Location: Package overview

From: frontend/package-lock.jsonnpm/@react-native/debugger-frontend@0.81.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@react-native/debugger-frontend@0.81.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@OneFineStarstuff OneFineStarstuff merged commit 9063c12 into main Apr 27, 2026
28 of 90 checks passed
@secure-code-warrior-for-github

Copy link
Copy Markdown

Micro-Learning Topic: Cross-site scripting (Detected by phrase)

Matched on "xSs"

Cross-site scripting vulnerabilities occur when unescaped input is rendered into a page displayed to the user. When HTML or script is included in the input, it will be processed by a user's browser as HTML or script and can alter the appearance of the page or execute malicious scripts in their user context.

Try a challenge in Secure Code Warrior

Helpful references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants