Skip to content

Commit 87faae7

Browse files
committed
Merge branch 'main' into merge-releases
2 parents 555d75d + 1d36238 commit 87faae7

File tree

18 files changed

+468
-132
lines changed

18 files changed

+468
-132
lines changed

.github/actions/artifacts_build/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ runs:
5252

5353
- name: Configure AWS Credentials
5454
if: ${{ inputs.push_image == true || inputs.push_image == 'true' }}
55-
uses: aws-actions/configure-aws-credentials@v4
55+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
5656
with:
5757
role-to-assume: ${{ inputs.snapshot-ecr-role }}
5858
aws-region: ${{ inputs.aws-region }}
@@ -67,14 +67,14 @@ runs:
6767
npm pack
6868
6969
- name: Set up QEMU
70-
uses: docker/setup-qemu-action@v3
70+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #3.6.0
7171

7272
- name: Set up Docker Buildx
73-
uses: docker/setup-buildx-action@v3
73+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1
7474

7575
- name: Login to private AWS ECR
7676
if: ${{ inputs.push_image == true || inputs.push_image == 'true' }}
77-
uses: docker/login-action@v3
77+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0
7878
with:
7979
registry: ${{ inputs.image_registry }}
8080
env:
@@ -90,7 +90,7 @@ runs:
9090
run: docker logout public.ecr.aws
9191

9292
- name: Build and push image according to input
93-
uses: docker/build-push-action@v5
93+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
9494
with:
9595
push: ${{ inputs.push_image }}
9696
context: .

.github/actions/image_scan/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
run: docker logout public.ecr.aws
3333

3434
- name: Run Trivy vulnerability scanner on image
35-
uses: aquasecurity/trivy-action@master
35+
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # v0.33.1
3636
with:
3737
image-ref: ${{ inputs.image-ref }}
3838
severity: ${{ inputs.severity }}

.github/actions/lambda_artifacts_build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
using: 'composite'
2525
steps:
2626
- name: Download Tarball to GitHub Actions
27-
uses: actions/download-artifact@v4
27+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 #v5.0.0
2828
with:
2929
name: ${{ inputs.staging_tarball}}
3030
path: ./aws-distro-opentelemetry-node-autoinstrumentation/

.github/actions/set_up/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
using: "composite"
2121
steps:
2222
- name: Set up node
23-
uses: actions/setup-node@v4
23+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
2424
with:
2525
node-version: ${{ inputs.node_version }}
2626
registry-url: 'https://registry.npmjs.org'

.github/workflows/application-signals-e2e-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Configure AWS Credentials
32-
uses: aws-actions/configure-aws-credentials@v4
32+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
3333
with:
3434
role-to-assume: arn:aws:iam::637423224110:role/${{ secrets.STAGING_ARTIFACTS_ACCESS_ROLE_NAME }}
3535
aws-region: us-east-1
3636

37-
- uses: actions/download-artifact@v4
37+
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 #v5.0.0
3838
with:
3939
name: ${{ inputs.staging-instrumentation-name }}
4040

.github/workflows/codeql.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ jobs:
5555
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5656
steps:
5757
- name: Checkout repository
58-
uses: actions/checkout@v4
58+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
5959

6060
# Initializes the CodeQL tools for scanning.
6161
- name: Initialize CodeQL
62-
uses: github/codeql-action/init@v3
62+
uses: github/codeql-action/init@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
6363
with:
6464
languages: ${{ matrix.language }}
6565
build-mode: ${{ matrix.build-mode }}
@@ -87,6 +87,41 @@ jobs:
8787
exit 1
8888
8989
- name: Perform CodeQL Analysis
90-
uses: github/codeql-action/analyze@v3
90+
uses: github/codeql-action/analyze@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
9191
with:
9292
category: "/language:${{matrix.language}}"
93+
94+
all-codeql-checks-pass:
95+
runs-on: ubuntu-latest
96+
needs: [analyze]
97+
if: always()
98+
steps:
99+
- name: Checkout to get workflow file
100+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
101+
102+
- name: Check all jobs succeeded and none missing
103+
run: |
104+
# Check if all needed jobs succeeded
105+
results='${{ toJSON(needs) }}'
106+
if echo "$results" | jq -r '.[] | .result' | grep -v success; then
107+
echo "Some jobs failed"
108+
exit 1
109+
fi
110+
111+
# Extract all job names from workflow (excluding this gate job)
112+
all_jobs=$(yq eval '.jobs | keys | .[]' .github/workflows/codeql.yml | grep -v "all-codeql-checks-pass" | sort)
113+
114+
# Extract job names from needs array
115+
needed_jobs='${{ toJSON(needs) }}'
116+
needs_list=$(echo "$needed_jobs" | jq -r 'keys[]' | sort)
117+
118+
# Check if any jobs are missing from needs
119+
missing_jobs=$(comm -23 <(echo "$all_jobs") <(echo "$needs_list"))
120+
if [ -n "$missing_jobs" ]; then
121+
echo "ERROR: Jobs missing from needs array in all-codeql-checks-pass:"
122+
echo "$missing_jobs"
123+
echo "Please add these jobs to the needs array of all-codeql-checks-pass"
124+
exit 1
125+
fi
126+
127+
echo "All CodeQL checks passed and no jobs missing from gate!"

.github/workflows/daily-scan.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout repo for dependency scan
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
3030
with:
3131
fetch-depth: 0
3232

3333
- name: Setup Node
34-
uses: actions/setup-node@v4
34+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
3535
with:
3636
node-version: "20"
3737

3838
- name: Configure AWS credentials for dependency scan
39-
uses: aws-actions/configure-aws-credentials@v4
39+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
4040
with:
4141
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
4242
aws-region: ${{ env.AWS_DEFAULT_REGION }}
4343

4444
- name: Get NVD API key for dependency scan
45-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
45+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
4646
id: nvd_api_key
4747
with:
4848
secret-ids: ${{ secrets.NVD_API_KEY_SECRET_ARN }}
@@ -70,13 +70,13 @@ jobs:
7070
run: less dependency-check-report.html
7171

7272
- name: Configure AWS credentials for image scan
73-
uses: aws-actions/configure-aws-credentials@v4
73+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
7474
with:
7575
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
7676
aws-region: ${{ env.AWS_DEFAULT_REGION }}
7777

7878
- name: Login to Public ECR
79-
uses: docker/login-action@v3
79+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0
8080
with:
8181
registry: public.ecr.aws
8282

@@ -100,7 +100,7 @@ jobs:
100100

101101
- name: Configure AWS Credentials for emitting metrics
102102
if: always()
103-
uses: aws-actions/configure-aws-credentials@v4
103+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
104104
with:
105105
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
106106
aws-region: ${{ env.AWS_DEFAULT_REGION }}

.github/workflows/main-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
staging_tarball_file: ${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}
3434
steps:
3535
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
3737

3838
- name: Get Node Distro Output
3939
id: node_output
@@ -73,7 +73,7 @@ jobs:
7373
aws s3 cp aws-distro-opentelemetry-node-autoinstrumentation/${{ steps.staging_tarball_output.outputs.STAGING_TARBALL }} s3://${{ env.STAGING_S3_BUCKET }}
7474
7575
- name: Upload Tarball to GitHub Actions
76-
uses: actions/upload-artifact@v4
76+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
7777
with:
7878
name: ${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}
7979
path: aws-distro-opentelemetry-node-autoinstrumentation/${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}
@@ -112,7 +112,7 @@ jobs:
112112
if: always()
113113
steps:
114114
- name: Configure AWS Credentials for emitting metrics
115-
uses: aws-actions/configure-aws-credentials@v4
115+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
116116
with:
117117
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
118118
aws-region: ${{ env.AWS_DEFAULT_REGION }}

.github/workflows/post-release-version-bump.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout main
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
2828
with:
2929
ref: main
3030
fetch-depth: 0
@@ -63,21 +63,21 @@ jobs:
6363
needs: check-version
6464
steps:
6565
- name: Configure AWS credentials for BOT secrets
66-
uses: aws-actions/configure-aws-credentials@v4
66+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
6767
with:
6868
role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
6969
aws-region: ${{ env.AWS_DEFAULT_REGION }}
7070

7171
- name: Get Bot secrets
72-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
72+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
7373
id: bot_secrets
7474
with:
7575
secret-ids: |
7676
BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
7777
parse-json-secrets: true
7878

7979
- name: Setup Git
80-
uses: actions/checkout@v2
80+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
8181
with:
8282
fetch-depth: 0
8383
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
@@ -99,7 +99,7 @@ jobs:
9999
git checkout -b "prepare-main-for-next-dev-cycle-${VERSION}" origin/$RELEASE_BRANCH
100100
101101
- name: Set up node
102-
uses: actions/setup-node@v4
102+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
103103
with:
104104
node-version: 20
105105

.github/workflows/pr-build.yml

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ permissions:
1616
contents: read
1717

1818
jobs:
19-
changelog-check:
19+
static-code-checks:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
2323
with:
2424
fetch-depth: 0
2525

2626
- name: Check CHANGELOG
27+
if: always()
2728
run: |
2829
# Check if PR is from workflows bot or dependabot
2930
if [[ "${{ github.event.pull_request.user.login }}" == "aws-application-signals-bot" ]]; then
@@ -52,6 +53,24 @@ jobs:
5253
echo "It looks like you didn't add an entry to CHANGELOG.md. If this change affects the SDK behavior, please update CHANGELOG.md and link this PR in your entry. If this PR does not need a CHANGELOG entry, you can add the 'Skip Changelog' label to this PR."
5354
exit 1
5455
56+
- name: Check for versioned GitHub actions
57+
if: always()
58+
run: |
59+
# Get changed GitHub workflow/action files
60+
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}..HEAD | grep -E "^\.github/(workflows|actions)/.*\.ya?ml$" || true)
61+
62+
if [ -n "$CHANGED_FILES" ]; then
63+
# Check for any versioned actions, excluding comments and this validation script
64+
VIOLATIONS=$(grep -Hn "uses:.*@v" $CHANGED_FILES | grep -v "grep.*uses:.*@v" | grep -v "#.*@v" || true)
65+
if [ -n "$VIOLATIONS" ]; then
66+
echo "Found versioned GitHub actions. Use commit SHAs instead:"
67+
echo "$VIOLATIONS"
68+
exit 1
69+
fi
70+
fi
71+
72+
echo "No versioned actions found in changed files"
73+
5574
build:
5675
runs-on: ubuntu-latest
5776
strategy:
@@ -65,11 +84,11 @@ jobs:
6584
NPM_CONFIG_UNSAFE_PERM: true
6685
steps:
6786
- name: Checkout Repo @ SHA - ${{ github.sha }}
68-
uses: actions/checkout@v4
87+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
6988
with:
7089
fetch-depth: 0
7190
- name: Setup Node
72-
uses: actions/setup-node@v4
91+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
7392
with:
7493
node-version: ${{ matrix.node }}
7594
- name: Update npm to a version that supports workspaces (v7 or later)
@@ -95,14 +114,14 @@ jobs:
95114
run: npm run test:coverage
96115
- name: Report Coverage
97116
if: ${{ matrix.code-coverage && !cancelled()}}
98-
uses: codecov/codecov-action@v4
117+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 #v5.5.1
99118
with:
100119
verbose: true
101120

102121
contract-test:
103122
runs-on: ubuntu-latest
104123
steps:
105-
- uses: actions/checkout@v4
124+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
106125
- name: run contract tests
107126
run: |
108127
bash ./scripts/build_and_install_distro.sh
@@ -113,8 +132,8 @@ jobs:
113132
lint:
114133
runs-on: ubuntu-latest
115134
steps:
116-
- uses: actions/checkout@v4
117-
- uses: actions/setup-node@v4
135+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
136+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
118137
with:
119138
node-version: 18
120139
cache: 'npm'
@@ -124,3 +143,38 @@ jobs:
124143
npm run lint
125144
npm run lint:markdown
126145
npm run lint:readme
146+
147+
all-pr-checks-pass:
148+
runs-on: ubuntu-latest
149+
needs: [static-code-checks, contract-test, lint, build]
150+
if: always()
151+
steps:
152+
- name: Checkout to get workflow file
153+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
154+
155+
- name: Check all jobs succeeded and none missing
156+
run: |
157+
# Check if all needed jobs succeeded
158+
results='${{ toJSON(needs) }}'
159+
if echo "$results" | jq -r '.[] | .result' | grep -v success; then
160+
echo "Some jobs failed"
161+
exit 1
162+
fi
163+
164+
# Extract all job names from workflow (excluding this gate job)
165+
all_jobs=$(yq eval '.jobs | keys | .[]' .github/workflows/pr-build.yml | grep -v "all-pr-checks-pass" | sort)
166+
167+
# Extract job names from needs array
168+
needed_jobs='${{ toJSON(needs) }}'
169+
needs_list=$(echo "$needed_jobs" | jq -r 'keys[]' | sort)
170+
171+
# Check if any jobs are missing from needs
172+
missing_jobs=$(comm -23 <(echo "$all_jobs") <(echo "$needs_list"))
173+
if [ -n "$missing_jobs" ]; then
174+
echo "ERROR: Jobs missing from needs array in all-pr-checks-pass:"
175+
echo "$missing_jobs"
176+
echo "Please add these jobs to the needs array of all-pr-checks-pass"
177+
exit 1
178+
fi
179+
180+
echo "All checks passed and no jobs missing from gate!"

0 commit comments

Comments
 (0)