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

chore(deps): bump actions/upload-artifact from 3 to 4 (#27) #1040

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
87 changes: 75 additions & 12 deletions .github/workflows/check_security_vulnerability.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,95 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Check Security Vulnerability
name: Code Quality and Security

on:
pull_request:
push:
branches:
- main
branches: [main]
schedule:
- cron: '0 0 * * 0'

env:
RUST_TOOLCHAIN: stable

# Add top-level permissions
permissions:
actions: write
contents: write
security-events: write
jobs:
lint:
name: DevSkim
runs-on: ubuntu-latest
shared-setup:
name: Shared Setup
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
permissions:
actions: read
contents: read
security-events: write
outputs:
checkout_ref: ${{ steps.checkout.outputs.ref }}
steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }} # Explicitly set token

security-scan:
name: Security Scans
needs: shared-setup
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
run_devskim: true
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ needs.shared-setup.outputs.checkout_ref }}

# Cache setup
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.rustup/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}-${{ github.sha }}

# Clippy Analysis
- name: Setup Rust tools
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }}
cargo install clippy-sarif sarif-fmt --force
- name: Run Clippy Analysis
run: cargo clippy --all-features --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
- name: Upload Clippy results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true

# DevSkim Security Scan
- name: Run DevSkim scanner
if: matrix.run_devskim == 'true'
uses: microsoft/DevSkim-Action@v1

- name: Upload DevSkim scan results to GitHub Security tab
if: matrix.run_devskim == 'true'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: devskim-results.sarif

osv-scanner:
name: OSV Scanner
needs: shared-setup
uses: "google/osv-scanner-action/.github/workflows/[email protected]"
with:
fail-on-vuln: false
8 changes: 4 additions & 4 deletions .github/workflows/release_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -42,7 +42,7 @@ jobs:
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -61,7 +61,7 @@ jobs:
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -76,7 +76,7 @@ jobs:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand Down
Loading