Skip to content

Enable DD_NO_SECURITY_AGENT_INSTALL by default - #488

Open
lebauce wants to merge 1 commit into
mainfrom
lebauce/no-security-agent-by-default
Open

lebauce wants to merge 1 commit into
mainfrom
lebauce/no-security-agent-by-default

Conversation

@lebauce

@lebauce lebauce commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Enable DD_NO_SECURITY_AGENT_INSTALL by default

Run CWS and CSPM in system-probe instead of the security Agent by
default when installing Agent 7.77.0 or later, or the latest version.
7.77.0 is the first version where the security Agent stops when both
CWS and CSPM run in system-probe.

  • DD_NO_SECURITY_AGENT_INSTALL=false keeps the security Agent
  • any other value forces it, even for older versions
  • the default is resolved after the minor version may have been lowered
    for old distributions (7.51 / 7.35)

The security Agent e2e tests now set DD_NO_SECURITY_AGENT_INSTALL=false,
and the no security Agent e2e test relies on the default.

@lebauce
lebauce requested a review from a team as a code owner November 12, 2026 15:22
@lebauce
lebauce requested a review from dustmop November 12, 2026 15:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T15:27:09.072078Z 40ceb8e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1e2e922 | Docs | View more details | Give us feedback!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40ceb8e000

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread install_script.sh.template Resolved
@lebauce
lebauce force-pushed the lebauce/no-security-agent-by-default branch from 40ceb8e to db447fa Compare November 12, 2026 15:38
Run CWS and CSPM in system-probe instead of the security Agent by
default when installing Agent 7.77.0 or later, or the latest version.
7.77.0 is the first version where the security Agent stops when both
CWS and CSPM run in system-probe.

- DD_NO_SECURITY_AGENT_INSTALL=false keeps the security Agent
- any other value forces it, even for older versions
- the default is resolved after the minor version may have been lowered
  for old distributions (7.51 / 7.35)

CSPM enabled by a previous installation is usually only configured in
security-agent.yaml, which is now told to stop running it. Detect it
there and enable it in datadog.yaml so that system-probe runs it, even
when DD_COMPLIANCE_CONFIG_ENABLED is not set again.

The security Agent e2e tests now set DD_NO_SECURITY_AGENT_INSTALL=false,
and the no security Agent e2e test relies on the default.

Also fix shellcheck SC2329 in localtest.sh, reported by shellcheck 0.11.
}

func (s *installNoSecurityAgentTestSuite) TestInstallNoSecurityAgent() {
s.InstallAgent(7, "DD_NO_SECURITY_AGENT_INSTALL=true DD_RUNTIME_SECURITY_CONFIG_ENABLED=true DD_COMPLIANCE_CONFIG_ENABLED=true DD_SITE=\"datadoghq.com\"", "Install latest Agent 7 without the security agent")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would it be better to change it to DD_NO_SECURITY_AGENT_INSTALL=false instead of removing it? This makes the test dependent upon the default behavior, which is a bit fragile, and the test name doesn't indicate that this is meant to test default behavior.

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