-
-
Notifications
You must be signed in to change notification settings - Fork 235
Apply security best practices for GitHub Repo Supply Chain #1180
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
Open
Nick2bad4u
wants to merge
5
commits into
orhun:main
Choose a base branch
from
Nick2bad4u:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+199
−84
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5d9b003
[StepSecurity] Apply security best practices
step-security-bot 71f6239
Protect against Supply Chain Attacks
Nick2bad4u d98f483
switch daily to monthly, add groups and pull request limit to new npm…
Nick2bad4u 75b84ae
format: pre-order list so npm is under the same header. add comment a…
Nick2bad4u 3d538b8
format: remove blank line
Nick2bad4u File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,11 +13,11 @@ jobs: | |
release_body: ${{ steps.git-cliff.outputs.content }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Generate a changelog | ||
uses: orhun/git-cliff-action@main | ||
uses: orhun/git-cliff-action@104a6cf3c9aa0fdfe4eab129f9c1900e1eb8f7fd # main | ||
id: git-cliff | ||
with: | ||
config: cliff.toml | ||
|
@@ -129,7 +129,7 @@ jobs: | |
} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Set the release version | ||
shell: bash | ||
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV | ||
|
@@ -142,21 +142,21 @@ jobs: | |
--allow-unauthenticated musl-tools | ||
fi | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | ||
with: | ||
toolchain: ${{ matrix.build.TOOLCHAIN }} | ||
target: ${{ matrix.build.TARGET }} | ||
override: true | ||
- name: Build (linux/macos) | ||
if: matrix.build.OS != 'windows-2022' | ||
uses: actions-rs/cargo@v1 | ||
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --release --locked --target ${{ matrix.build.TARGET }} | ||
- name: Build (windows) | ||
if: matrix.build.OS == 'windows-2022' | ||
uses: actions-rs/cargo@v1 | ||
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 | ||
with: | ||
command: build | ||
args: --release --locked --target ${{ matrix.build.TARGET }} # --no-default-features | ||
|
@@ -197,7 +197,7 @@ jobs: | |
git-cliff-${{ env.RELEASE_VERSION }}-${{ matrix.build.TARGET }}.tar.gz | ||
- name: Publish to GitHub | ||
if: ${{ !contains(github.ref, '-') }} | ||
uses: svenstaro/upload-release-action@v2 | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: git-cliff-${{ env.RELEASE_VERSION }}-${{ matrix.build.TARGET }}* | ||
|
@@ -208,7 +208,7 @@ jobs: | |
body: "${{ needs.generate-changelog.outputs.release_body }}" | ||
- name: Publish to GitHub (pre-release) | ||
if: ${{ contains(github.ref, '-') }} | ||
uses: svenstaro/upload-release-action@v2 | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: git-cliff-${{ env.RELEASE_VERSION }}-${{ matrix.build.TARGET }}* | ||
|
@@ -219,7 +219,7 @@ jobs: | |
prerelease: true | ||
- name: Install node | ||
if: matrix.build.NPM_PUBLISH == true | ||
uses: actions/setup-node@v4 | ||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||
with: | ||
node-version: 18 | ||
registry-url: "https://registry.npmjs.org" | ||
|
@@ -252,7 +252,7 @@ jobs: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Build Python wheels (linux) | ||
if: matrix.build.PYPI_PUBLISH == true && startsWith(matrix.build.NAME, 'linux') | ||
uses: PyO3/maturin-action@v1 | ||
uses: PyO3/maturin-action@35be3186fc8e037e329f06b68dcd807d83dcc6dc # v1.49.2 | ||
with: | ||
working-directory: pypi | ||
target: ${{ matrix.build.TARGET }} | ||
|
@@ -265,7 +265,7 @@ jobs: | |
if: | | ||
matrix.build.PYPI_PUBLISH == true && | ||
(startsWith(matrix.build.OS, 'macos') || startsWith(matrix.build.OS, 'windows')) | ||
uses: PyO3/maturin-action@v1 | ||
uses: PyO3/maturin-action@35be3186fc8e037e329f06b68dcd807d83dcc6dc # v1.49.2 | ||
with: | ||
working-directory: pypi | ||
target: ${{ matrix.build.TARGET }} | ||
|
@@ -274,7 +274,7 @@ jobs: | |
sccache: "false" | ||
- name: Build Python wheels (musl) | ||
if: matrix.build.PYPI_PUBLISH == true && endsWith(matrix.build.OS, 'musl') | ||
uses: PyO3/maturin-action@v1 | ||
uses: PyO3/maturin-action@35be3186fc8e037e329f06b68dcd807d83dcc6dc # v1.49.2 | ||
with: | ||
working-directory: pypi | ||
target: ${{ matrix.build.TARGET }} | ||
|
@@ -283,7 +283,7 @@ jobs: | |
sccache: "false" | ||
manylinux: musllinux_1_2 | ||
- name: Upload Python wheels | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
with: | ||
name: "wheels-${{ matrix.build.TARGET }}" | ||
working-directory: pypi | ||
|
@@ -295,9 +295,9 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Install node | ||
uses: actions/setup-node@v4 | ||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||
with: | ||
node-version: 18 | ||
registry-url: "https://registry.npmjs.org" | ||
|
@@ -325,13 +325,13 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
needs: publish-binaries | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | ||
with: | ||
path: pypi/wheels | ||
pattern: wheels-* | ||
merge-multiple: true | ||
- name: Publish to PyPI | ||
uses: PyO3/maturin-action@v1 | ||
uses: PyO3/maturin-action@35be3186fc8e037e329f06b68dcd807d83dcc6dc # v1.49.2 | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ vars.USE_TESTPYPI == 'true' && secrets.TESTPYPI_API_TOKEN || secrets.PYPI_API_TOKEN }} | ||
MATURIN_REPOSITORY: ${{ vars.USE_TESTPYPI == 'true' && 'testpypi' || 'pypi' }} | ||
|
@@ -345,12 +345,12 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Set the release version | ||
shell: bash | ||
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable | ||
with: | ||
targets: x86_64-unknown-linux-gnu | ||
- name: Install cargo-deb | ||
|
@@ -375,7 +375,7 @@ jobs: | |
git-cliff-${{ env.RELEASE_VERSION }}.deb | ||
- name: Upload the release | ||
if: ${{ !contains(github.ref, '-') }} | ||
uses: svenstaro/upload-release-action@v2 | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: git-cliff-${{ env.RELEASE_VERSION }}.deb | ||
|
@@ -384,7 +384,7 @@ jobs: | |
body: "${{ needs.generate-changelog.outputs.release_body }}" | ||
- name: Upload the pre-release | ||
if: ${{ contains(github.ref, '-') }} | ||
uses: svenstaro/upload-release-action@v2 | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: git-cliff-${{ env.RELEASE_VERSION }}.deb | ||
|
@@ -398,12 +398,12 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Set the release version | ||
shell: bash | ||
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable | ||
with: | ||
targets: x86_64-unknown-linux-gnu | ||
- name: Install cargo-generate-rpm | ||
|
@@ -426,7 +426,7 @@ jobs: | |
git-cliff-${{ env.RELEASE_VERSION }}.x86_64.rpm | ||
- name: Upload the release | ||
if: ${{ !contains(github.ref, '-') }} | ||
uses: svenstaro/upload-release-action@v2 | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: git-cliff-${{ env.RELEASE_VERSION }}.x86_64.rpm | ||
|
@@ -435,7 +435,7 @@ jobs: | |
body: "${{ needs.generate-changelog.outputs.release_body }}" | ||
- name: Upload the pre-release | ||
if: ${{ contains(github.ref, '-') }} | ||
uses: svenstaro/upload-release-action@v2 | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: git-cliff-${{ env.RELEASE_VERSION }}.x86_64.rpm | ||
|
@@ -448,11 +448,11 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Set the release version | ||
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable | ||
with: | ||
targets: x86_64-unknown-linux-gnu | ||
- name: Prepare for the crates.io release | ||
|
@@ -485,7 +485,7 @@ jobs: | |
contents: read | ||
steps: | ||
- name: Bump formula | ||
uses: mislav/[email protected] | ||
uses: mislav/bump-homebrew-formula-action@8e2baa47daaa8db10fcdeb04105dfa6850eb0d68 # v3.4 | ||
with: | ||
formula-name: git-cliff | ||
formula-path: Formula/g/git-cliff.rb | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.