Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/chainguard/self.gitlab.read.sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ subject_pattern: "project_path:DataDog/.*"
claim_pattern:
project_path: "DataDog/helm-charts"
ref: ".+"
ref_protected: "true"
permissions:
contents: read
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ e2e:
- export E2E_GCP_PRIVATE_KEY_PASSWORD

# Set GITHUB_TOKEN to avoid getting rate-limited when pulumi sdk downloads the kubernetes provider
- export GITHUB_TOKEN=$(aws ssm get-parameter --region us-east-1 --name ci.helm-charts.github_token --with-decryption --query "Parameter.Value" --out text)
- export GITHUB_TOKEN=$(dd-octo-sts token --scope DataDog/datadog-agent --policy self.gitlab.read))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Request the policy from the repository that defines it

When the E2E job requests a token, --scope identifies the repository whose .github/chainguard policy is evaluated, but self.gitlab.read is introduced in DataDog/helm-charts while this command requests it from DataDog/datadog-agent. Every existing workflow pairs these local policies with scope: DataDog/helm-charts (for example .github/workflows/release.yaml:29-30), so this request cannot use the new policy and leaves GITHUB_TOKEN empty; because export VAR=$(...) masks the substitution's failure status, the job continues unauthenticated and can still hit the GitHub rate limit this change is intended to prevent.

Useful? React with 👍 / 👎.


# Use S3 backend to store stack status
- export PULUMI_CONFIG_PASSPHRASE=$(aws ssm get-parameter --region us-east-1 --name ci.helm-charts.pulumi_password --with-decryption --query "Parameter.Value" --out text)
Expand All @@ -96,3 +96,6 @@ e2e:

script:
- E2E_BUILD_TAGS=$E2E_BUILD_TAGS E2E_PROFILE=ci E2E_AGENT_VERSION=$E2E_AGENT_VERSION make test-e2e
id_tokens:
DDOCTOSTS_ID_TOKEN:
aud: dd-octo-sts