Skip to content

WIP Security/Compliance Agent scaffold - #5440

Merged
xornivore merged 2 commits into
masterfrom
xornivore/security-compliance-agent
May 1, 2020
Merged

xornivore merged 2 commits into
masterfrom
xornivore/security-compliance-agent

Conversation

@xornivore

Copy link
Copy Markdown
Contributor

Security Agent runs as a separate process and is responsible for running compliance checks.

Security Agent uses logs intake to trigger signals based on configured rules.

  • Initial CLI for security agent
  • event command to send a compliance.RuleEvent payload to the backend.
security-agent compliance event --rule-name=cis-something-1.2.3 --rule-version=v1 --framework=cis_something --data=permissions:644

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Describe your test plan

Write there any instructions and details you may have to test your PR.

Security Agent runs as a separate process and is responsible for running compliance checks.

Security Agent uses logs intake to trigger signals based on configured rules.

- Initial CLI for security agent
- `event` command to send a `compliance.RuleEvent` payload to the backend.

```
security-agent compliance event --rule-name=cis-something-1.2.3 --rule-version=v1 --framework=cis_something --data=permissions:644
```
@xornivore xornivore added this to the 7.20.0 milestone Apr 30, 2020
@xornivore
xornivore requested review from a team April 30, 2020 12:43
@xornivore
xornivore marked this pull request as ready for review April 30, 2020 17:54
@xornivore
xornivore requested review from a team as code owners April 30, 2020 17:54
@xornivore
xornivore merged commit 47c7856 into master May 1, 2020
@xornivore
xornivore deleted the xornivore/security-compliance-agent branch May 1, 2020 13:11
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-2020 Datadog, Inc.

// +build kubeapiserver

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.

why this?

gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Nov 9, 2026
…` builds (#59871)

### What does this PR do?
Drop the `ld_vars` blocks of `security-agent.build` and `cws-instrumentation.build`, which pass `-X` ldflags for `main.Version`, `main.GoVersion`, `main.GitBranch`, `main.GitCommit` and `main.BuildDate`, along with `get_go_version`, their last caller.

### Motivation
Neither `cmd/security-agent` nor `cmd/cws-instrumentation` has ever declared those variables, so **the linker drops the flags**, while the tasks still run `git` and `go version` for them at every build.

The block originates from the process agent, whose `main` package declared those variables at the time:
- #5440 copied it into the security agent's scaffold,
- #11230 removed it from the process agent, along with those variables, in favor of `pkg/version`, which both binaries already report,
- #18620 copied the security agent's block into `tasks/cws_instrumentation.py`, leaving these 2 copies as the last ones.

### Describe how you validated your changes
Built `security-agent` and `cws-instrumentation` with and without the change, and checked that:
- each kept its size and build settings,
- `security-agent` (the only one not stripped) kept its symbols (none of which is one of those variables) as well as its `version` output.

Co-authored-by: regis.desgroppes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants