Skip to content

Commit df4d61d

Browse files
authored
Merge branch 'main' into jordan.gonzalez/gitlab/secrets-from-kv
2 parents 4f3a5a2 + 0d19e53 commit df4d61d

4 files changed

Lines changed: 82 additions & 2 deletions

File tree

.github/workflows/nightly-serverless-init.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ jobs:
3636
run: |
3737
STAMP=$(date -u +%Y%m%d)
3838
SHORT_SHA=$(git -C datadog-agent rev-parse --short=8 HEAD)
39+
AGENT_VERSION=$(grep -m 1 -E '^[0-9]+\.[0-9]+\.[0-9]+$' datadog-agent/CHANGELOG.rst) || { echo "ERROR: could not detect agent version from datadog-agent's CHANGELOG.rst"; exit 1; }
3940
echo "stamp=${STAMP}" >> "$GITHUB_OUTPUT"
4041
echo "short_sha=${SHORT_SHA}" >> "$GITHUB_OUTPUT"
4142
echo "version=nightly-${STAMP}-${SHORT_SHA}" >> "$GITHUB_OUTPUT"
43+
echo "agent_version=${AGENT_VERSION}" >> "$GITHUB_OUTPUT"
4244
4345
# Pin QEMU to a known-good version. See release-serverless-init.yml
4446
# and test-qemu-versions.yml for context on QEMU breakage history.
@@ -56,6 +58,7 @@ jobs:
5658
env:
5759
AGENT_PATH: datadog-agent
5860
VERSION: ${{ steps.meta.outputs.version }}
61+
AGENT_VERSION: ${{ steps.meta.outputs.agent_version }}
5962
SERVERLESS_INIT: "true"
6063
ALPINE: ${{ matrix.arrays.isAlpine }}
6164

.github/workflows/release-serverless-init.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
- "no"
2323
agentVersion:
2424
type: string
25-
description: Datadog agent version
25+
description: Datadog agent version (default latest release tag from Datadog agent branch)
2626
agentBranch:
2727
type: string
2828
description: Datadog agent branch or tag name (default main)
@@ -53,6 +53,15 @@ jobs:
5353
ref: ${{ github.event.inputs.agentBranch }}
5454
path: datadog-agent
5555

56+
- name: Compute agent version
57+
id: meta
58+
run: |
59+
AGENT_VERSION="${{ github.event.inputs.agentVersion }}"
60+
if [ -z "$AGENT_VERSION" ]; then
61+
AGENT_VERSION=$(grep -m 1 -E '^[0-9]+\.[0-9]+\.[0-9]+$' datadog-agent/CHANGELOG.rst) || { echo "ERROR: could not detect agent version from datadog-agent's CHANGELOG.rst; set the Datadog agent version manually"; exit 1; }
62+
fi
63+
echo "agent_version=${AGENT_VERSION}" >> "$GITHUB_OUTPUT"
64+
5665
# Pin QEMU to a known-good version. The default (binfmt:latest) has broken
5766
# arm64 emulation multiple times due to QEMU segfaults in libc-bin triggers:
5867
# - Feb 2025: qemu-v9.2.0 — PR #571 pinned, PR #581 reverted to :latest
@@ -76,7 +85,7 @@ jobs:
7685
VERSION: ${{ github.event.inputs.tag }}
7786
SERVERLESS_INIT: true
7887
ALPINE: ${{ matrix.arrays.isAlpine }}
79-
AGENT_VERSION: ${{ github.event.inputs.agentVersion }}
88+
AGENT_VERSION: ${{ steps.meta.outputs.agent_version }}
8089

8190
- name: Set up build directory and copy binaries
8291
run: |

.github/workflows/secrets-scan.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Secrets Scan
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
gitleaks:
11+
name: Secrets Scan
12+
runs-on: ubuntu-22.04
13+
permissions:
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Run gitleaks
21+
uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2.3.9
22+
with:
23+
args: --redact
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}

.gitleaks.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
title = "datadog-lambda-extension gitleaks config"
2+
3+
# This file configures gitleaks to suppress known false positives.
4+
# Only add entries here after confirming a finding is NOT a real secret.
5+
# If a real secret is found: rotate it immediately, then add the commit hash to the `commits` list under [allowlist] below.
6+
#
7+
# Maintenance workflow:
8+
# 1. gitleaks flags something on a PR
9+
# 2. Review the finding — is it a real secret or a false positive?
10+
# 3. Real secret → rotate immediately, fix the code, optionally add the commit hash below
11+
# 4. False positive → add the appropriate entry below with a comment explaining why
12+
13+
[allowlist]
14+
description = "Known false positives"
15+
16+
# paths: skip entire directories or files from scanning.
17+
# Use when a directory contains third-party code or test fixtures with fake data.
18+
# Examples:
19+
# "integration-tests/node_modules" — npm dependencies, not our code
20+
# "bottlecap/tests/fixtures" — test payloads with placeholder values
21+
# "docs/examples" — documentation examples with fake keys
22+
paths = [
23+
# npm dependencies bundled under integration-tests — not our code, would be noisy
24+
"integration-tests/node_modules",
25+
]
26+
27+
# regexes: suppress findings whose matched secret value matches one of these patterns.
28+
# Use for placeholder/example values that appear in source or docs but are not real secrets.
29+
# Examples:
30+
# '''your-api-key''' — generic placeholder in docs or scripts
31+
# '''my_test_key''' — unit test placeholder (bottlecap/tests/)
32+
# '''AKIAIOSFODNN7EXAMPLE''' — AWS example key from official AWS documentation
33+
# '''DD_API_KEY_EXAMPLE''' — Datadog placeholder used in README examples
34+
regexes = []
35+
36+
# commits: suppress all findings from a specific historical commit.
37+
# Use when a commit contained a now-rotated credential that cannot be rewritten
38+
# (e.g., it is already on the default branch or in a public tag).
39+
# Always document why the commit is suppressed and confirm the credential was rotated.
40+
# Examples:
41+
# "abc123def456" — rotated DD_API_KEY accidentally committed on 2024-01-15, key invalidated
42+
commits = []

0 commit comments

Comments
 (0)