-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add agentless-scanner software #23484
Conversation
dfb109a
to
0b81296
Compare
0b81296
to
cf6c7ef
Compare
Bloop Bleep... Dogbot HereRegression Detector ResultsRun ID: 3c1210c8-6fdc-4859-a10a-9cf9db0ff617 Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | file_to_blackhole | % cpu utilization | +0.64 | [-5.96, +7.25] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | basic_py_check | % cpu utilization | +1.36 | [-0.90, +3.63] |
➖ | file_to_blackhole | % cpu utilization | +0.64 | [-5.96, +7.25] |
➖ | tcp_syslog_to_blackhole | ingress throughput | +0.05 | [-0.01, +0.10] |
➖ | trace_agent_json | ingress throughput | +0.01 | [-0.02, +0.03] |
➖ | trace_agent_msgpack | ingress throughput | +0.01 | [-0.01, +0.02] |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.00, +0.00] |
➖ | uds_dogstatsd_to_api | ingress throughput | -0.00 | [-0.00, +0.00] |
➖ | otel_to_otel_logs | ingress throughput | -0.09 | [-0.72, +0.54] |
➖ | process_agent_standard_check_with_stats | memory utilization | -0.13 | [-0.16, -0.09] |
➖ | file_tree | memory utilization | -0.18 | [-0.25, -0.10] |
➖ | idle | memory utilization | -0.25 | [-0.29, -0.22] |
➖ | process_agent_standard_check | memory utilization | -0.65 | [-0.68, -0.61] |
➖ | process_agent_real_time_mode | memory utilization | -0.66 | [-0.70, -0.63] |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.79 | [-2.21, +0.64] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
cf6c7ef
to
8cc0e8c
Compare
--- | ||
features: | ||
- | | ||
Introduce the agentless-scanner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introduce the agentless-scanner. | |
Introduce the Agentless scanner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
47bf711
to
9c5b8f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the only agent-platform/barx owned file
6eba266
to
e85d448
Compare
29d7e05
to
f784b62
Compare
Hi @DataDog/documentation. |
cmd/agentless-scanner/awsmain.go
Outdated
"github.com/DataDog/datadog-agent/cmd/agentless-scanner/awsutils" | ||
"github.com/DataDog/datadog-agent/cmd/agentless-scanner/devices" | ||
"github.com/DataDog/datadog-agent/cmd/agentless-scanner/runner" | ||
"github.com/DataDog/datadog-agent/cmd/agentless-scanner/types" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually try to have only the CLI in cmd
folder and the core logic for the product in comp
if it has a state or pkg
if it's pure helpers functions.
Could we split the agentless to follow this pattern ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the agentless packages to the pkg/agentless
directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You seems to have internal state which point toward comp
folder instead. We aim for the pkg
folder to be stateless at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which internal state are you referring to?
cmd/agentless-scanner/awsmain.go
Outdated
|
||
scanner, err := runner.New(runner.Options{ | ||
ScannerID: scannerID, | ||
DdEnv: pkgconfig.Datadog.GetString("env"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration need to be setup/loaded correctly before being used. We also deprecated using the config package directly in favor of the component project (see comp
folder`).
If you reuse existing code you should migrate the agentless logic to component. ASC team is happy to help with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already use components for log
and config
.
See https://github.com/DataDog/datadog-agent/pull/23484/files#diff-b8a0f435748d226bbe4ceef46dc31888a5553823587d0ce1190d51f246ae65e8R68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: In this case it should be easy to use config.Component instead of pkgconfig.Datadog
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
cmd/agentless-scanner/awsmain.go
Outdated
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types" | ||
"github.com/aws/aws-sdk-go-v2/service/lambda" | ||
|
||
"github.com/DataDog/datadog-agent/pkg/util/log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for log, is needs to be setup/configured correctly before being use (to take into account the configuration). Using component will also solve this for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already use components for log and config.
See https://github.com/DataDog/datadog-agent/pull/23484/files#diff-b8a0f435748d226bbe4ceef46dc31888a5553823587d0ce1190d51f246ae65e8R68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, side question: this looks like a code import from another repo (8k new lines in a single commit).
If' it's the case, could we keep the code history from the original repo ?
This is an import from the following branch: jinroh/side-scanner (based on 7.51.x branch). I'd love to import the commit history into this PR (or rather a cleaned-up history), however it will be unfortunately squashed into a single commit by the now mandatory Of course, we plan to keep the development history in a branch called |
You can use |
I'd like to clarify that the
|
We need a default value to avoid a warning "Unknown key in config file".
…h the right cloud provider
Go Package Import DifferencesThis comment was omitted because it was over 65,536 characters. Please check the Gitlab Job logs to see its output. |
What does this PR do?
This change adds the
agentless-scanner
software.The
agentless-scanner
fetches software package data from cloud resources, which is forwarded to Datadog for vulnerability scans.The
cmd/agentless-scanner
andpkg/agentless
code is based on the jinroh/side-scanner branch.Motivation
Additional Notes
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes