Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update artifact GH actions to V4, V3 to-be-deprecated #172

Merged
merged 1 commit into from
Jan 17, 2025
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/codecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: |
./gradlew scanBuild --no-daemon
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
Copy link
Contributor

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

When using a third party action, one needs to provide its GitHub path (owner/project) and can eventually pin it to a Git ref (a branch name, a Git tag, or a commit hash).

No pinned Git ref means the action uses the latest commit of the default branch each time it runs, eventually running newer versions of the code that were not audited by Datadog. Specifying a Git tag is better, but since they are not immutable, using a full length hash is recommended to make sure the action content is actually frozen to some reviewed state.

Be careful however, as even pinning an action by hash can be circumvented by attackers still. For instance, if an action relies on a Docker image which is itself not pinned to a digest, it becomes possible to alter its behaviour through the Docker image without actually changing its hash. You can learn more about this kind of attacks in Unpinnable Actions: How Malicious Code Can Sneak into Your GitHub Actions Workflows. Pinning actions by hash is still a good first line of defense against supply chain attacks.

Additionally, pinning by hash or tag means the action won’t benefit from newer version updates if any, including eventual security patches. Make sure to regularly check if newer versions for an action you use are available. For actions coming from a very trustworthy source, it can make sense to use a laxer pinning policy to benefit from updates as soon as possible.

View in Datadog  Leave us feedback  Documentation

if: always()
with:
name: scan-build-reports
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
sed -i "s#target_branch#${HEAD_REF}#g" report-gh.html
python .github/scripts/python_utils.py cppcheck_cleanup report-gh.html >> comment.html
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: cppcheck-report
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: failure()
steps:
- name: Download failed tests artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
Copy link
Contributor

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

When using a third party action, one needs to provide its GitHub path (owner/project) and can eventually pin it to a Git ref (a branch name, a Git tag, or a commit hash).

No pinned Git ref means the action uses the latest commit of the default branch each time it runs, eventually running newer versions of the code that were not audited by Datadog. Specifying a Git tag is better, but since they are not immutable, using a full length hash is recommended to make sure the action content is actually frozen to some reviewed state.

Be careful however, as even pinning an action by hash can be circumvented by attackers still. For instance, if an action relies on a Docker image which is itself not pinned to a digest, it becomes possible to alter its behaviour through the Docker image without actually changing its hash. You can learn more about this kind of attacks in Unpinnable Actions: How Malicious Code Can Sneak into Your GitHub Actions Workflows. Pinning actions by hash is still a good first line of defense against supply chain attacks.

Additionally, pinning by hash or tag means the action won’t benefit from newer version updates if any, including eventual security patches. Make sure to regularly check if newer versions for an action you use are available. For actions coming from a very trustworthy source, it can make sense to use a laxer pinning policy to benefit from updates as soon as possible.

View in Datadog  Leave us feedback  Documentation

with:
name: failures
path: ./artifacts
Expand All @@ -34,4 +34,4 @@ jobs:

curl -X POST "${{ secrets.SLACK_WEBHOOK }}" \
-H 'Content-Type: application/json' \
-d "{'scenarios': '${scenarios}', 'failed_run_url': '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'}"
-d "{'scenarios': '${scenarios}', 'failed_run_url': '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'}"
68 changes: 34 additions & 34 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
export PATH=${JAVA_TEST_HOME}/bin:$PATH
./gradlew clean build --no-daemon --parallel --build-cache --no-watch-fs
- name: Upload Logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: graalvm-${{ matrix.java_version }}-logs
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
export PATH=${JAVA_TEST_HOME}/bin:$PATH
./gradlew clean build --no-daemon --parallel --build-cache --no-watch-fs
- name: Upload Logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: graalvm-${{ matrix.java_version }}-logs
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
exit 1
fi
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: reports-linux-glibc-${{ matrix.java_version }}-amd64.zip
Expand All @@ -232,17 +232,17 @@ jobs:
ddprof-test/build/reports/tests
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: glibc-${{ matrix.java_version }}-${{ matrix.config }}-amd64
path: build/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failures
path: failures_glibc-${{ matrix.java_version }}-${{ matrix.config }}-amd64.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: recordings
Expand Down Expand Up @@ -325,7 +325,7 @@ jobs:
fi
ls -la /tmp
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: reports-linux-glibc-${{ matrix.java_version }}-aarch64.zip
Expand All @@ -335,17 +335,17 @@ jobs:
ddprof-test/build/reports/tests
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: glibc-${{ matrix.java_version }}-${{ matrix.config }}-aarch64
path: build/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failures
path: failures_glibc-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: recordings
Expand Down Expand Up @@ -419,7 +419,7 @@ jobs:
exit 1
fi
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: reports-linux-glibc-j9-${{ matrix.java_version }}-amd64.zip
Expand All @@ -429,17 +429,17 @@ jobs:
ddprof-test/build/reports/tests
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: glibc-j9-${{ matrix.java_version }}-${{ matrix.config }}-amd64
path: build/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failures
path: failures_glibc-j9-${{ matrix.java_version }}-${{ matrix.config }}-amd64.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: recordings
Expand Down Expand Up @@ -516,7 +516,7 @@ jobs:
exit 1
fi
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: reports-linux-glibc-j9-${{ matrix.java_version }}-aarch64.zip
Expand All @@ -526,17 +526,17 @@ jobs:
ddprof-test/build/reports/tests
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: glibc-j9-${{ matrix.java_version }}-${{ matrix.config }}-aarch64
path: build/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failures
path: failures_glibc-j9-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: recordings
Expand Down Expand Up @@ -622,7 +622,7 @@ jobs:
exit 1
fi
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: reports-linux-oracle-jdk-8.zip
Expand All @@ -631,17 +631,17 @@ jobs:
ddprof-test/build/reports/tests
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: x64-oracle-jdk8-${{ matrix.config }}
path: build/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failures
path: failures_glibc-oracle8-${{ matrix.config }}.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: recordings
Expand Down Expand Up @@ -742,7 +742,7 @@ jobs:
exit 1
fi
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: reports-linux-musl-${{ matrix.java_version }}-amd64.zip
Expand All @@ -752,17 +752,17 @@ jobs:
ddprof-test/build/reports/tests
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: musl-${{ matrix.java_version }}-${{ matrix.config }}-amd64
path: build/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failures
path: failures_musl-${{ matrix.java_version }}-${{ matrix.config }}-amd64.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: recordings
Expand Down Expand Up @@ -871,7 +871,7 @@ jobs:
exit 1
fi
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: reports-linux-zing-jdk-${{ matrix.java_version }}-amd64.zip
Expand All @@ -880,17 +880,17 @@ jobs:
ddprof-test/build/reports/tests/test
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
Copy link
Contributor

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

When using a third party action, one needs to provide its GitHub path (owner/project) and can eventually pin it to a Git ref (a branch name, a Git tag, or a commit hash).

No pinned Git ref means the action uses the latest commit of the default branch each time it runs, eventually running newer versions of the code that were not audited by Datadog. Specifying a Git tag is better, but since they are not immutable, using a full length hash is recommended to make sure the action content is actually frozen to some reviewed state.

Be careful however, as even pinning an action by hash can be circumvented by attackers still. For instance, if an action relies on a Docker image which is itself not pinned to a digest, it becomes possible to alter its behaviour through the Docker image without actually changing its hash. You can learn more about this kind of attacks in Unpinnable Actions: How Malicious Code Can Sneak into Your GitHub Actions Workflows. Pinning actions by hash is still a good first line of defense against supply chain attacks.

Additionally, pinning by hash or tag means the action won’t benefit from newer version updates if any, including eventual security patches. Make sure to regularly check if newer versions for an action you use are available. For actions coming from a very trustworthy source, it can make sense to use a laxer pinning policy to benefit from updates as soon as possible.

View in Datadog  Leave us feedback  Documentation

if: success()
with:
name: glibc-zing-${{ matrix.java_version }}-${{ matrix.config }}-amd64
path: build/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failures
path: failures_zing-${{ matrix.java_version }}-${{ matrix.config }}-amd64.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: recordings
Expand Down Expand Up @@ -1001,7 +1001,7 @@ jobs:
exit 1
fi
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
Copy link
Contributor

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

When using a third party action, one needs to provide its GitHub path (owner/project) and can eventually pin it to a Git ref (a branch name, a Git tag, or a commit hash).

No pinned Git ref means the action uses the latest commit of the default branch each time it runs, eventually running newer versions of the code that were not audited by Datadog. Specifying a Git tag is better, but since they are not immutable, using a full length hash is recommended to make sure the action content is actually frozen to some reviewed state.

Be careful however, as even pinning an action by hash can be circumvented by attackers still. For instance, if an action relies on a Docker image which is itself not pinned to a digest, it becomes possible to alter its behaviour through the Docker image without actually changing its hash. You can learn more about this kind of attacks in Unpinnable Actions: How Malicious Code Can Sneak into Your GitHub Actions Workflows. Pinning actions by hash is still a good first line of defense against supply chain attacks.

Additionally, pinning by hash or tag means the action won’t benefit from newer version updates if any, including eventual security patches. Make sure to regularly check if newer versions for an action you use are available. For actions coming from a very trustworthy source, it can make sense to use a laxer pinning policy to benefit from updates as soon as possible.

View in Datadog  Leave us feedback  Documentation

if: always()
with:
name: reports-linux-zing-jdk-${{ matrix.java_version }}-aarch64.zip
Expand All @@ -1010,17 +1010,17 @@ jobs:
ddprof-test/build/reports/tests/test
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: glibc-zing-${{ matrix.java_version }}-${{ matrix.config }}-aarch64
path: build/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failures
path: failures_zing-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: recordings
Expand Down
Loading