Add cosmwasm-vm advisory CWA-2023-004 (#2052) #1369
This file contains 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
name: Assign IDs | |
on: | |
push: | |
branches: main | |
jobs: | |
assign-ids: | |
name: Assign IDs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache cargo bin | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/bin | |
key: rustsec-admin-v0.8.8 | |
- name: Install rustsec-admin | |
run: | | |
VERSION="0.8.8" | |
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then | |
cargo install rustsec-admin --force --vers "$VERSION" | |
fi | |
- name: Assign IDs | |
id: assign | |
run: | | |
message=$(rustsec-admin assign-id --github-actions-output) | |
echo "commit_message=${message}" >> $GITHUB_OUTPUT | |
- name: Create duplicate ID assignment guard | |
run: | | |
echo "This file causes merge conflicts if two ID assignment jobs run concurrently." > .duplicate-id-guard | |
echo "This prevents duplicate ID assignment due to a race between those jobs." >> .duplicate-id-guard | |
ls -R ./crates/ ./rust/ | sha256sum >> .duplicate-id-guard | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: ${{ steps.assign.outputs.commit_message }} | |
title: ${{ steps.assign.outputs.commit_message }} | |
branch: assign-ids |