Skip to content

Comments

[K9VULN-9361] Move Agentless Scanning cloudformation to a dedicated folder#252

Closed
k3nz0 wants to merge 10 commits intomasterfrom
moez.ezzeddine/refactor-cfn-agentless
Closed

[K9VULN-9361] Move Agentless Scanning cloudformation to a dedicated folder#252
k3nz0 wants to merge 10 commits intomasterfrom
moez.ezzeddine/refactor-cfn-agentless

Conversation

@k3nz0
Copy link
Member

@k3nz0 k3nz0 commented Oct 31, 2025

What does this PR do?

Move Agentless Scanning cloudformation out of aws_quickstart/ to a dedicated folder.
We also now pin the agentless template link in main_extended.yaml.

@k3nz0 k3nz0 requested review from a team as code owners October 31, 2025 11:39
- IsCrossAccountScanning
- 'https://<BUCKET_PLACEHOLDER>.s3.amazonaws.com/aws/<VERSION_PLACEHOLDER>/datadog_agentless_delegate_role.yaml'
- 'https://<BUCKET_PLACEHOLDER>.s3.amazonaws.com/aws/<VERSION_PLACEHOLDER>/datadog_agentless_scanning.yaml'
- 'https://datadog-cloudformation-template.s3.amazonaws.com/aws_agentless/v1.0.0/datadog_agentless_delegate_role.yaml'
Copy link
Member Author

@k3nz0 k3nz0 Nov 3, 2025

Choose a reason for hiding this comment

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

Setting the bucket and pinning the version here on purpose.

Whenever the aws_agentless/version.txt gets updated, the aws_agentless/release.sh script will update this file too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@mohamed-challal mohamed-challal left a comment

Choose a reason for hiding this comment

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

LGTM

k3nz0 and others added 2 commits November 3, 2025 15:09
Co-authored-by: Diogo Pereira <diogo.pereira@datadoghq.com>
@k3nz0 k3nz0 requested a review from diogocp November 3, 2025 14:13
Comment on lines 225 to 226
- 'https://<BUCKET_PLACEHOLDER>.s3.amazonaws.com/aws/<VERSION_PLACEHOLDER>/datadog_agentless_delegate_role.yaml'
- 'https://<BUCKET_PLACEHOLDER>.s3.amazonaws.com/aws/<VERSION_PLACEHOLDER>/datadog_agentless_scanning.yaml'
- 'https://datadog-cloudformation-template.s3.amazonaws.com/aws_agentless/v5.0.0/datadog_agentless_delegate_role.yaml'
- 'https://datadog-cloudformation-template.s3.amazonaws.com/aws_agentless/v5.0.0/datadog_agentless_scanning.yaml'
Copy link
Contributor

Choose a reason for hiding this comment

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

💭 why pin this instead of getting the latest version from aws_agentless/version.txt?

Copy link
Contributor

Choose a reason for hiding this comment

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

also looks like the agentless release script can use a different bucket name, so I assume we'd want to keep <BUCKET_PLACEHOLDER>?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a placeholder for the version and updated the release script

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we'd want to keep datadog-cloudformation-template which is another S3 bucket.

Copy link
Member

@diogocp diogocp left a comment

Choose a reason for hiding this comment

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

I'm skeptical of this change because it seems to create bigger problems than it solves.

For most changes, we will still need to bump the quickstart version and release it. It's the same thing with more steps. We still need reviews from the AWS integrations team for those changes.

We will have two version numbers to keep track of—except with this change we would only track one; we would need to pass the quickstart version to the agentless template for the API to know exactly what is being deployed.

I think there are problems with the current release process. But as long as we want to integrate with quickstart, we still need to go through its release process. If we really want to make improvements, we have to improve quickstart too.

```

The release script will automatically:
- Update the pinned agentless version in `aws_quickstart/main_extended.yaml` to match the new version
Copy link
Member

Choose a reason for hiding this comment

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

I think this is outdated after your latest changes—as is the agentless release script.

@k3nz0
Copy link
Member Author

k3nz0 commented Nov 4, 2025

I'm skeptical of this change because it seems to create bigger problems than it solves.

I agree this makes things a bit more complex. I actually hesitated before doing it.

Today, the issue is that aws_quickstart/ is getting polluted with Agentless-specific CloudFormation templates that don't necessarily belong to the core integration. For example, the CopySnapshot permissions template is purely an Agentless concern.

We also have more Agentless templates coming:

  • A fix for missing autoscaling permissions
  • A fix for missing SDS permissions
  • CloudFormation StackSets for multi-account Agentless Scanning

To avoid confusion and establish clear ownership, I moved all Agentless Scanning templates into aws_agentless/. This seemed to make it easier to reason about.
The release scripts keep things synchronized. The quickstart script reads the Agentless version and injects it into main_extended.yaml, so the coupling is explicit and manageable.

I considered an alternative where we keep datadog_agentless_scanning.yaml, datadog_agentless_api_call.py, and datadog_agentless_delegate_role.yaml under aws_quickstart/ and put only the auxiliary Agentless templates in aws_agentless/.

I chose full separation so the answer to “where does my template live?” is always “aws_agentless/,” making the structure simpler to understand.

@k3nz0 k3nz0 closed this Dec 18, 2025
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.

5 participants