2026-05-13 07:22:39 +02:00
|
|
|
name: NYX Security Scan
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
pull_request:
|
|
|
|
|
branches: [main, master]
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
nyx-scan:
|
2026-05-13 07:28:55 +02:00
|
|
|
runs-on: docker-amd64
|
2026-05-13 07:22:39 +02:00
|
|
|
|
|
|
|
|
steps:
|
2026-05-13 07:28:55 +02:00
|
|
|
- name: Checkout PR
|
2026-05-13 07:36:50 +02:00
|
|
|
run: |
|
|
|
|
|
git clone --depth=1 \
|
|
|
|
|
"https://oauth2:${{ github.token }}@bitfreedom.net/code/${{ github.repository }}.git" \
|
|
|
|
|
.
|
|
|
|
|
git fetch --depth=1 origin ${{ github.sha }}
|
|
|
|
|
git checkout ${{ github.sha }}
|
2026-05-13 07:22:39 +02:00
|
|
|
|
2026-05-13 07:28:55 +02:00
|
|
|
- name: Clone nyx from Forgejo mirror
|
|
|
|
|
run: |
|
|
|
|
|
git clone --depth=1 --branch master \
|
2026-05-13 07:36:50 +02:00
|
|
|
"https://oauth2:${{ github.token }}@bitfreedom.net/code/apunkt/nyx.git" \
|
|
|
|
|
.nyx-src
|
2026-05-13 07:22:39 +02:00
|
|
|
|
|
|
|
|
- name: Install Rust
|
2026-05-13 07:28:55 +02:00
|
|
|
run: |
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
|
|
|
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
2026-05-13 07:22:39 +02:00
|
|
|
|
|
|
|
|
- name: Build nyx from source
|
|
|
|
|
run: |
|
|
|
|
|
cd .nyx-src
|
|
|
|
|
cargo build --release
|
2026-05-13 07:47:04 +02:00
|
|
|
cp target/release/nyx /usr/local/bin/nyx
|
2026-05-13 07:22:39 +02:00
|
|
|
|
|
|
|
|
- name: Run NYX scan
|
|
|
|
|
run: |
|
2026-05-13 07:56:10 +02:00
|
|
|
.nyx-src/target/release/nyx scan --format sarif --fail-on MEDIUM > nyx-results.sarif || true
|
2026-05-13 07:22:39 +02:00
|
|
|
|
2026-05-13 07:58:15 +02:00
|
|
|
- name: Show findings
|
|
|
|
|
run: cat nyx-results.sarif
|
|
|
|
|
|
2026-05-13 07:28:55 +02:00
|
|
|
- name: Upload SARIF results
|
2026-05-13 07:22:39 +02:00
|
|
|
if: always()
|
2026-05-13 07:28:55 +02:00
|
|
|
uses: https://code.forgejo.org/actions/upload-artifact@v4
|
2026-05-13 07:22:39 +02:00
|
|
|
with:
|
|
|
|
|
name: nyx-sarif-report
|
|
|
|
|
path: nyx-results.sarif
|