Skip to content

docs(ci-syslog-watcher): document config writer trust boundary - #9882

Open
Calvin S. (calvin197) wants to merge 3 commits into
mainfrom
security/document-mdsd-ci-syslog-risk
Open

Calvin S. (calvin197) wants to merge 3 commits into
mainfrom
security/document-mdsd-ci-syslog-risk

Conversation

@calvin197

@calvin197 Calvin S. (calvin197) commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

A security review flagged ci-syslog-watcher.sh copying the Container Insights rsyslog configuration into /etc/rsyslog.d and restarting rsyslog without content validation (ADO finding 37518910).

This comment-only PR keeps the trust requirement next to that handoff so future maintainers and AI-assisted reviewers can see the external deployment dependency without reconstructing the context:

  • The Container Insights add-on supplies the configuration outside AgentBaker.
  • Loading that configuration trusts writers of /var/run/mdsd-ci to configure host rsyslog. Deployment owners must restrict write access to components trusted for that role.
  • HostPath write access alone does not establish equivalent node-level privilege. The deployment's writer restrictions require verification; this PR does not claim add-on owner confirmation.

This is documentation, not a mitigation or a completed risk-acceptance decision. It does not establish that content validation has no possible defense-in-depth value, or guarantee that future scans will stop reporting this path.

No functional or behavioral change. Validation for this revision: bash -n, shellcheck, and git diff --check passed. Comparing the script before and after with full-line comments removed confirmed that all non-comment lines are unchanged. The watcher itself was not executed.

Which issue(s) this PR fixes:

Documents context for the tracked finding; it does not remediate or close it.

ADO work items (msazure/CloudNativeCompute): 37518910 (parent: 37518878)

…slog config copy

ci-syslog-watcher.sh copies /var/run/mdsd-ci/70-rsyslog-forward-mdsd-ci.conf
into /etc/rsyslog.d and restarts rsyslog without validating its content.
This is intentional, not an oversight:

  - The trust boundary for this script is the /var/run/mdsd-ci directory
    itself, which is populated by the privileged Container Insights
    (mdsd/AMA) add-on via a hostPath mount - a component deployed and
    access-controlled entirely outside this repo. AgentBaker has no
    visibility into, or control over, who can write to that directory.
  - Anything capable of writing into /var/run/mdsd-ci already has
    node-level privilege equivalent to what content validation here
    could additionally restrict, so adding it would not meaningfully
    reduce risk - it would only create a false sense of security.
  - The real control point is the add-on's own hostPath/RBAC
    configuration, which is out of scope for this repo.

No functional change - in-place comment only. Verified: bash -n and
shellcheck both pass with no warnings. No existing ShellSpec coverage
for this script to regress.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 350c2577-7031-4d0d-adc1-e99d053fc981
@calvin197
Calvin S. (calvin197) requested review from a team as code owners October 23, 2026 07:00
Copilot AI balanced review requested due to automatic review settings October 23, 2026 07:00
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   18 suites   1m 12s ⏱️
662 tests 662 ✅ 0 💤 0 ❌
685 runs  685 ✅ 0 💤 0 ❌

Results for commit 47e7ea8.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The risk acceptance depends on external writer privileges and access controls that require confirmation from the add-on owner.

1 open issue
What changed in this PR

Documents the risk-acceptance rationale for AgentBaker’s Container Insights syslog watcher copying configuration without content validation.

Changes:

  • Adds an inline explanation of the intended trust boundary and external add-on access controls.
  • Leaves configuration copying and rsyslog restart behavior unchanged.
File Description
parts/​linux/​cloud-init/​artifacts/​ci-syslog-watcher.sh Adds security rationale comments around the existing configuration copy.

Review effort: Balanced

Comment thread parts/linux/cloud-init/artifacts/ci-syslog-watcher.sh Outdated
Copilot's review on PR #9882 correctly pointed out that the risk-acceptance
comment overclaimed: write access to the /var/run/mdsd-ci hostPath does not
inherently guarantee node-level privilege for every possible writer - a
workload could in principle be scoped to write only that one path. Reworded
to state this as a deployment assumption that is confirmed by the add-on
owner, rather than an inherent property of directory access. No functional
change - comment wording only.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 350c2577-7031-4d0d-adc1-e99d053fc981
Copilot AI balanced review requested due to automatic review settings October 29, 2026 03:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Risk acceptance for ADO 37518910 depends on external deployment controls and confirmation that all hostPath writers already have equivalent node privileges, requiring security or add-on owner validation unavailable in this repository.

No open issues 🎉

1 resolved since last review

Review effort: Balanced


if [ "$status" = "add" ]; then
echo "Status changed to $status."
# By design: the rsyslog config dropped here is not content-validated before being

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this actually necessary?

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

Copilot-Session: bb31c5eb-70b8-418b-93cc-3c2bc38e0951
Copilot AI balanced review requested due to automatic review settings October 29, 2026 17:34
@calvin197 Calvin S. (calvin197) changed the title docs(ci-syslog-watcher): document risk-acceptance for unvalidated rsyslog config copy  docs(ci-syslog-watcher): document config writer trust boundary Oct 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the comment-only update documenting the syslog configuration trust boundary.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 27% ❌
staging_cse_windows Package 1 68% ➖
debug 0% ❌
provisioningscripts 2% ❌
parts_windows Package 1 73% ➖
Summary 39% (1819 / 7001) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 29% ❌
Summary 29% (4716 / 16389) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
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 89% ✔
github.com/Azure/agentbaker/aks-node-controller/utils 0% ❌
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 78% ➖
github.com/Azure/agentbaker/pkg/agent/datamodel 77% ➖
github.com/Azure/agentbaker/pkg/agent/toggles 0% ❌
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 87% ✔
Summary 75% (6059 / 8026) ➖

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.

3 participants