Skip to content

fix(apm-audit): preserve drift visibility — switch to setup-only (v5.1.2)#13

Merged
danielmeppiel merged 1 commit intomainfrom
fix/apm-audit-no-install-overwrite
May 8, 2026
Merged

fix(apm-audit): preserve drift visibility — switch to setup-only (v5.1.2)#13
danielmeppiel merged 1 commit intomainfrom
fix/apm-audit-no-install-overwrite

Conversation

@danielmeppiel
Copy link
Copy Markdown
Contributor

Bug

apm-action@v1 with default inputs runs apm install before audit. Install re-deploys managed primitives from upstream, overwriting any tamper of a deployed file in the PR. apm audit then sees a clean tree and content-integrity / drift checks pass.

Repro

DevExpGbb/zava-storefront#18 — Beat 5 of D2 governance demo. PR weakens secure-coding-base.instructions.md (a deployed file from secure-baseline). Local apm audit --ci correctly fires:

[x]  content-integrity   1 file(s) with hash drift
[x]  drift               .github/instructions/secure-coding-base.instructions.md

CI on v5.1.1 → green. Tampered file silently restored by install.

Fix

setup-only: true — installs apm CLI on PATH only. No install step. Audit runs against the PR's actual file state.

Other policy beats (#10 required-packages, #13/#14 dependency-denylist, #11 unmanaged-files) all still fire because audit reads apm.yml and disk independently of install.

Follow-up

Will tag v5.1.2, point v5 floating tag at it, bump zava-storefront ci.yml, re-replay all 5 beats.

apm-action@v1 with default inputs runs 'apm install' which re-deploys
managed primitives from upstream and OVERWRITES any tampered file in
the PR. That silently disables content-integrity / drift detection.

Switch to setup-only: true (apm CLI on PATH, no install). apm audit then
runs against the PR's actual file state, so drift fires when expected.

Caught while wiring D2 governance demo Beat 5 (DevExpGbb/zava-storefront#18,
which initially passed CI green despite a clear tamper of secure-coding-base).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danielmeppiel danielmeppiel merged commit 0d0ec6f into main May 8, 2026
1 check passed
danielmeppiel added a commit to DevExpGbb/zava-storefront that referenced this pull request May 8, 2026
Restores drift detection visibility (setup-only fix in
DevExpGbb/zava-agent-config#13).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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