Skip to content

feat(compliance): restore initial compliance-scanning integration - #9587

Draft
Robert Wojciechowski (robertwoj-microsoft) wants to merge 13 commits into
mainfrom
robertwoj/integrations
Draft

Robert Wojciechowski (robertwoj-microsoft) wants to merge 13 commits into
mainfrom
robertwoj/integrations

Conversation

@robertwoj-microsoft

Copy link
Copy Markdown
Contributor

Initial integration of new build-time compliance scanning.

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   21 suites   1m 8s ⏱️
811 tests 811 ✅ 0 💤 0 ❌
838 runs  838 ✅ 0 💤 0 ❌

Results for commit f552357.

♻️ This comment has been updated with latest results.

@aks-node-assistant

Copy link
Copy Markdown
Contributor

AgentBaker gate detective

Run: 183320423
Failed job/stage/task: build / build2204fipsgen2containerd / Test, Scan, and Cleanup
Detective summary: Ubuntu 22.04 FIPS Test/Scan again reported CIS regressions detected; this matches the recurring tracked CIS baseline drift already covered by repair #39908382.
Likely cause/signature: Recurring CIS rule 6.1.3.1 regression in Ubuntu 22.04 FIPS scan output.
Confidence: High
Recommended owner/action: AgentBaker VHD/CIS baseline owner: keep repair #39908382 moving and refresh/validate the CIS expected baseline.
Strongest alternative: PR change-caused is less likely because this signature reproduced across unrelated PRs; unrelated E2E warnings were non-fatal in this build.
Evidence links: build report, build timeline, failed task log, wiki tracker
Wiki signature: vhd-ubuntu2204fips-cis-rule-6-1-3-1-regression

Bump kompli and the Ubuntu 22.04/24.04 benchmark packages to build 189335935. kompli now requires version and versionConstraint in every plan block, so both committed plans were regenerated with the pinned binary from the matching definitions. Rule IDs are unchanged; parameters now carry the definition defaults.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ions

Stage only the definitions the committed plan references, from exactly the pinned package versions, and upload a validated snapshot. On the scan VM, install them exclusively under root-owned parents, run the plan once and return the result, log and exit status separately. Render JUnit only after a successful run into a per-run directory that is the only publish source; the scan stays non-blocking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Split each Ubuntu plan into L1 and L2-only expected-compliant and expected-non-compliant sets plus manual rules, following the CIS-CAT regression baselines and the definitions' level tags. Run every plan once in a single scan VM invocation, continuing after failures; upload result and log before the status blob so a present status proves a complete transfer. Render one JUnit per successful plan, restricted to that plan's rules. Fix the plan validation, which rejected every well-formed plan. Add ShellSpec coverage for both scripts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the RETURN traps in run_kompli_scan with a wrapper that runs cleanup after the scan body: with functrace enabled the traps fired when nested functions returned and removed the input snapshots mid-scan. Identify the held definition descriptor via /dev/fd so the install also works in subshells. In the specs, replace definitions without reusing their inode and assert the actual stdout and stderr of every kompli example.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve deferred test setup and input validation while satisfying both lint passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	vhdbuilder/packer/vhd-scanning.sh
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 27% ❌
parts_windows Package 1 74% ➖
staging_cse_windows Package 1 72% ➖
debug 0% ❌
provisioningscripts 2% ❌
Summary 40% (2073 / 7315) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 29% ❌
Summary 29% (5086 / 17278) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
github.com/Azure/agentbaker/aks-live-patching/pkg/status 100% ✔
github.com/Azure/agentbaker/apiserver 24% ❌
github.com/Azure/agentbaker/cmd 0% ❌
github.com/Azure/agentbaker/cmd/starter 0% ❌
github.com/Azure/agentbaker/fuzz/api 0% ❌
github.com/Azure/agentbaker/hotfix/render-nodecustomdata 35% ❌
github.com/Azure/agentbaker/pkg/agent 79% ➖
github.com/Azure/agentbaker/pkg/agent/datamodel 77% ➖
github.com/Azure/agentbaker/pkg/agent/toggles 0% ❌
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 87% ✔
github.com/Azure/agentbaker/aks-node-controller 73% ➖
github.com/Azure/agentbaker/aks-node-controller/common 100% ✔
github.com/Azure/agentbaker/aks-node-controller/helpers 68% ➖
github.com/Azure/agentbaker/aks-node-controller/parser 88% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/gpu 100% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/nodeconfigutils 92% ✔
github.com/Azure/agentbaker/aks-node-controller/utils 0% ❌
Summary 84% (6152 / 8108) ✔

This branch has not been deployed

No deployments
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