Skip to content

Commit fff3311

Browse files
fix(ci): hypatia-scan.yml -- --exit-zero + GITHUB_TOKEN (hyperpolymath/hypatia#213) (#32)
* fix(ci): hypatia-scan.yml -- pass GITHUB_TOKEN, use --exit-zero (hyperpolymath/hypatia#213) The Hypatia Security Scan workflow exits 1 on any findings (>= medium) because lib/hypatia/cli.ex halts with System.halt(1). Under `set -e`, that short-circuits the step before jq/artifact-upload/PR-comment run. Mirrors hyperpolymath/hypatia#228: * pass GITHUB_TOKEN so the Dependabot rule stops warning * append --exit-zero so the downstream critical/high gate stays the explicit gate * bump actions/upload-artifact to v4.6.2 (ea165f8d) to match the estate-wide pin See hyperpolymath/hypatia#213 for the diagnosis. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(ci): bump erlef/setup-beam to fc68ffb (ubuntu24 support) Follow-up commit on PR #32. The Hypatia Neurosymbolic Analysis check has been failing because `erlef/setup-beam@2f0cc07b…` doesn't know how to map `ImageOS=ubuntu24` (only knows ubuntu18/20/22). Without the bootstrap, the `--exit-zero` change in this PR never gets exercised. Bumping the pin to `fc68ffb90438ef2936bbb3251622353b3dcb2f93` (matches the pin currently in hyperpolymath/hypatia upstream, dated 2026-03-30, adds ubuntu24 → ubuntu-24.04 mapping). 🤖 Generated with [Claude Code](https://claude.com/claude-code) * fix(manifests): add top-level identity to vendored A2ML + K9 templates The 6 A2ML manifests under verified-container-spec/.machine_readable/6a2/ and the 6 K9 templates/examples under .machine_readable/svc/k9/ were firing identity-field validation errors on every CI run, blocking #32 (and any other PR) from going green. Two parallel fixes: * A2ML: added `name = "verified-container-spec/<file>"` inside the [metadata] section of META, NEUROSYM, PLAYBOOK, AGENTIC (the 4 that lacked any top-level identity). STATE and ECOSYSTEM already had `project` / `name` respectively; left untouched. * K9 templates/examples: hoisted a `name = "k9-template/<level>"` or `name = "k9-example/<name>"` field to the top of each pedigree block, immediately after `schema_version`. Works around a brace-counting edge in hyperpolymath/k9-validate-action's pedigree-block detector: when `pedigree = {` opens, the validator doesn't count the opening brace from that line, so a subsequent `security = { ... },` closing brace prematurely terminates the validator's view of the pedigree block — making `metadata.name` invisible. The hoisted top-level `pedigree.name` is captured at depth 1 before any nested block, so it's seen regardless of the bug. The underlying bug is being addressed upstream in k9-validate-action#7. Both classes of error will also be self-suppressing once stapeln bumps its action pins to consume the new `paths-ignore` input being added in hyperpolymath/a2ml-validate-action#7 + hyperpolymath/k9-validate-action#7 (vendored / training-corpus paths default-skipped). The fixes here are belt-and-suspenders — independent of those upstream merges, so stapeln #32 can go green today rather than waiting on the dependency chain. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 96b85c2 commit fff3311

11 files changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/hypatia-scan.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fetch-depth: 0 # Full history for better pattern analysis
2727

2828
- name: Setup Elixir for Hypatia scanner
29-
uses: erlef/setup-beam@2f0cc07b4b9bea248ae098aba9e1a8a1de5ec24c # v1.18.2
29+
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.18.2
3030
with:
3131
elixir-version: '1.19.4'
3232
otp-version: '28.3'
@@ -50,11 +50,14 @@ jobs:
5050
5151
- name: Run Hypatia scan
5252
id: scan
53+
env:
54+
# Suppress the Dependabot "GITHUB_TOKEN not set" warning.
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5356
run: |
5457
echo "Scanning repository: ${{ github.repository }}"
5558
5659
# Run scanner
57-
HYPATIA_FORMAT=json "$HOME/hypatia/hypatia-cli.sh" scan . > hypatia-findings.json
60+
HYPATIA_FORMAT=json "$HOME/hypatia/hypatia-cli.sh" scan . --exit-zero > hypatia-findings.json
5861
5962
# Count findings
6063
FINDING_COUNT=$(jq '. | length' hypatia-findings.json 2>/dev/null || echo 0)
@@ -76,7 +79,7 @@ jobs:
7679
echo "- Medium: $MEDIUM" >> $GITHUB_STEP_SUMMARY
7780
7881
- name: Upload findings artifact
79-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
82+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8083
with:
8184
name: hypatia-findings
8285
path: hypatia-findings.json

.machine_readable/svc/k9/examples/ci-config.k9.ncl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ K9!
66

77
{
88
pedigree = {
9+
name = "k9-example/ci-config",
910
schema_version = "1.0.0",
1011
component_type = "ci-configuration",
1112
security = {

.machine_readable/svc/k9/examples/project-metadata.k9.ncl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ K9!
66

77
{
88
pedigree = {
9+
name = "k9-example/project-metadata",
910
schema_version = "1.0.0",
1011
component_type = "project-metadata",
1112
security = {

.machine_readable/svc/k9/examples/setup-repo.k9.ncl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ K9!
66

77
{
88
pedigree = {
9+
name = "k9-example/setup-repo",
910
schema_version = "1.0.0",
1011
component_type = "repository-setup",
1112
security = {

.machine_readable/svc/k9/template-hunt.k9.ncl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ K9!
66

77
{
88
pedigree = {
9+
name = "k9-template/hunt",
910
schema_version = "1.0.0",
1011
component_type = "TODO: describe component type (e.g., 'deployment', 'setup-script')",
1112
security = {

.machine_readable/svc/k9/template-kennel.k9.ncl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ K9!
66

77
{
88
pedigree = {
9+
name = "k9-template/kennel",
910
schema_version = "1.0.0",
1011
component_type = "TODO: describe component type (e.g., 'build-config', 'metadata')",
1112
security = {

.machine_readable/svc/k9/template-yard.k9.ncl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ K9!
66

77
{
88
pedigree = {
9+
name = "k9-template/yard",
910
schema_version = "1.0.0",
1011
component_type = "TODO: describe component type (e.g., 'validated-config', 'schema')",
1112
security = {

verified-container-spec/.machine_readable/6a2/AGENTIC.a2ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
# AGENTIC.a2ml — AI agent constraints and capabilities
55
[metadata]
6+
name = "verified-container-spec/AGENTIC"
67
version = "0.1.0"
78
last-updated = "2026-04-11"
89

verified-container-spec/.machine_readable/6a2/META.a2ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
# META.a2ml — Verified Container Spec meta-level information
55
[metadata]
6+
name = "verified-container-spec/META"
67
version = "0.1.0"
78
last-updated = "2026-04-11"
89

verified-container-spec/.machine_readable/6a2/NEUROSYM.a2ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
# NEUROSYM.a2ml — Neurosymbolic integration metadata
55
[metadata]
6+
name = "verified-container-spec/NEUROSYM"
67
version = "0.1.0"
78
last-updated = "2026-04-11"
89

0 commit comments

Comments
 (0)