Skip to content

DEMO Beat 5: drift on deployed file (DO NOT MERGE)#18

Draft
danielmeppiel wants to merge 2 commits intomainfrom
demo/beat5-drift-tamper
Draft

DEMO Beat 5: drift on deployed file (DO NOT MERGE)#18
danielmeppiel wants to merge 2 commits intomainfrom
demo/beat5-drift-tamper

Conversation

@danielmeppiel
Copy link
Copy Markdown
Contributor

Demo artifact — D2 Governance, Beat 5 (drift detection)

Scenario: A developer edits a deployed managed instruction file — .github/instructions/secure-coding-base.instructions.md (produced by zava-agent-config/plugins/secure-baseline) — to weaken the "no string-concatenation into SQL" rule. The lockfile (apm.lock.yaml) records the expected SHA256 of every deployed file. apm audit --ci recomputes hashes and fails on drift.

Expected CI result: RED on content-integrity + drift checks.

Local verification:

[x]  content-integrity   1 file(s) with hash drift
[x]  drift               .github/instructions/secure-coding-base.instructions.md
[i]  Run 'apm install' to re-sync deployed files with the lockfile.

Aha for the room: the floor is signed, end-to-end. Hand-edit a managed file → CI catches it on the next PR. Restoration is one apm install away. No skills required to govern; no escape hatches.

Reference: https://microsoft.github.io/apm/guides/drift-detection/

Closes nothing — DO NOT MERGE.

danielmeppiel added a commit to DevExpGbb/zava-agent-config that referenced this pull request May 8, 2026
…13)

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 changed the title DEMO Beat 5 — drift on deployed file (DO NOT MERGE) DEMO Beat 5: drift on deployed file (DO NOT MERGE) May 8, 2026
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