Skip to content

docs(ci-syslog-watcher): document risk-acceptance for unvalidated rsyslog config copy  - #9882

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

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

Conversation

@calvin197

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

A security scan flagged ci-syslog-watcher.sh copying /var/run/mdsd-ci/70-rsyslog-forward-mdsd-ci.conf into /etc/rsyslog.d and restarting rsyslog without validating its content (ADO finding 37518910). This PR documents why that is intentional and should not be changed:

  • 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/behavioral change — in-place comment only. Validated: bash -n and shellcheck both pass with no warnings. No existing ShellSpec coverage for this script to regress.

Which issue(s) this PR fixes:
Fixes #

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

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   18 suites   58s ⏱️
563 tests 563 ✅ 0 💤 0 ❌
585 runs  585 ✅ 0 💤 0 ❌

Results for commit 5139fd0.

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 27% ❌
staging_cse_windows Package 1 65% ➖
debug 0% ❌
provisioningscripts 2% ❌
parts_windows Package 1 73% ➖
Summary 38% (1652 / 6834) ❌

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 on lines +15 to +19
# mount - a component deployed and access-controlled outside this repo. Anything
# capable of writing into that directory already has node-level privilege equivalent
# to what this script could additionally restrict, so adding content validation here
# would not meaningfully reduce risk; the real control point is that add-on's
# hostPath/RBAC configuration, not this script.
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 28% ❌
Summary 28% (4591 / 16082) ❌

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.

2 participants