You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add validation step to require commit SHAs instead of version tags for
third-party GitHub actions in workflow files. Also fix the one we
missed: `aquasecurity/trivy-action` - depending on `master` is pretty
unusual and not trivial to catch, ultimately the Repo config `Require
actions to be pinned to a full-length commit SHA` will protect against
this if we missed any others.
* `Python Instrumentation PR Build / static-code-checks (pull_request)`
passes
* `Check CHANGELOG` fails, causing PR-build to fail, but `Check for
versioned GitHub action` passes:
https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/17924516041/job/50967250100?pr=475
* Added various [`@v` in
code](aws-observability@f2f0523),
only finds uncommented ones:
https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/17925754982/job/50971348934?pr=475
```
Found versioned GitHub actions. Use commit SHAs instead:
.github/actions/lambda_artifacts_build/action.yml:30: - uses: actions/checkout@v4
.github/actions/lambda_artifacts_build/action.yml:42: - uses: actions/checkout@v4 #v4
.github/workflows/daily-scan.yml:54: - uses: actions/checkout@v4 #v4
.github/workflows/daily-scan.yml:106: - uses: actions/checkout@v4
```
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
if [[ "${{ github.event.pull_request.user.login }}" == "aws-application-signals-bot" ]]; then
25
+
echo "Skipping check: PR from aws-application-signals-bot"
26
+
exit 0
27
+
fi
28
+
29
+
if [[ "${{ github.event.pull_request.user.login }}" == "dependabot[bot]" ]]; then
30
+
echo "Skipping check: PR from dependabot"
31
+
exit 0
32
+
fi
33
+
34
+
# Check for skip changelog label
35
+
if echo '${{ toJSON(github.event.pull_request.labels.*.name) }}' | jq -r '.[]' | grep -q "skip changelog"; then
36
+
echo "Skipping check: skip changelog label found"
37
+
exit 0
38
+
fi
39
+
40
+
# Fetch base branch and check for CHANGELOG modifications
41
+
git fetch origin ${{ github.base_ref }}
42
+
if git diff --name-only origin/${{ github.base_ref }}..HEAD | grep -q "CHANGELOG.md"; then
43
+
echo "CHANGELOG.md entry found - check passed"
44
+
exit 0
45
+
fi
46
+
47
+
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."
0 commit comments