Skip to content

chore(security): automated monthly SBOM & VEX report - #158

Open
Gustavohsdp wants to merge 2 commits into
mainfrom
chore/security-monthly
Open

chore(security): automated monthly SBOM & VEX report#158
Gustavohsdp wants to merge 2 commits into
mainfrom
chore/security-monthly

Conversation

@Gustavohsdp

@Gustavohsdp Gustavohsdp commented Jul 27, 2026

Copy link
Copy Markdown

What this PR adds

Installs the automated software supply-chain security pipeline for openplc-runtime (hybrid C/C++ core + Python Flask web server). Three flows, all driven by the same data:

  • Monthly SBOM & VEX report.github/workflows/security-monthly.yml. On the 1st of each month: resolves requirements.txt into a clean venv and builds the SBOM with cyclonedx-py (CycloneDX 1.6 + SPDX 2.3), scans against OSV honoring the osv-scanner.toml VEX baseline, renders a report from security/report-config.json, opens a PR with the dated snapshot under security/<YYYY-MM>/. Runs against the default branch (main).
  • PR security gate.github/workflows/security-pr-gate.yml. On every PR: fails only when the PR introduces a NEW HIGH/CRITICAL advisory (pre-existing never blocks). Resolves base vs head SBOMs; skips the base resolve when requirements.txt is unchanged. Posts a sticky comment with package, version, advisory link, fixed version, and how to resolve.
  • Archive on merge.github/workflows/security-pr-archive.yml. On merge, commits the SBOM + report under security/pr-<number>-<date>/.

Supporting files: scripts/ (Python SBOM generator, report renderer, OSV diff/gate), osv-scanner.toml (VEX baseline), security/report-config.json, security/README.md.

Security posture (assessment)

45 Python components (the single third-party C library, SOEM, is a pinned git submodule with no known advisory, tracked separately). All 5 Python advisories are not applicable (test/dev tooling, or functions the running Flask server never calls): 0 require remediation, 0 exploitable.

⚠️ Licensing note (material for IP/legal)

The runtime is MIT, but the optional EtherCAT plugin links SOEM, which is GPLv3-or-commercial (RT-Labs). Under the open-source option the plugin becomes GPLv3; a commercial product likely needs a purchased SOEM license. Affects only the EtherCAT plugin — the MIT core and other plugins are unaffected. Flagged for acquisition due diligence.

What to review

  • osv-scanner.toml + security/report-config.json — the VEX triage + the SOEM licensing note. Best reviewed by product security (Thiago).
  • .github/workflows/security-*.yml — the three flows.

Notes

  • Not enforced yet: the gate reports pass/fail but does not block merges until set as a required status check.

Ports the supply-chain automation to openplc-runtime (public repo — no AI triage;
Claude step skipped gracefully, deterministic SBOM + report + PR still run).
Python variant: generate-sbom.sh resolves requirements.txt into a clean venv and
builds the CycloneDX SBOM with cyclonedx-py; OSV scans the SBOM honoring the VEX
baseline. 0 advisories require action (all 5 confined to test/dev tooling or
functions the Flask server never calls). SOEM (EtherCAT C lib) is a submodule
tracked apart — no advisory, but GPLv3-or-commercial (material, noted in report).
Baseline suppresses the 23 known IDs; the live Flask stack is left visible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AejAiL4tfXCyMhwtjY4vFT
…erge (Python)

Gate now only scans/reports (contents: read) and posts one actionable sticky PR
comment; per-PR SBOM archived on MERGE by security-pr-archive.yml. Validated on
autonomy-edge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AejAiL4tfXCyMhwtjY4vFT
@Gustavohsdp
Gustavohsdp force-pushed the chore/security-monthly branch from 4fafbf9 to 6a54f18 Compare July 31, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant