fix: replace vulnerable users crate with whoami
Code Quality / quality-checks (push) Has been cancelled
Security Scan / security-audit (push) Has been cancelled

The users crate (RUSTSEC-2025-0040) has an unfixable vulnerability.
Replace it with the maintained whoami crate for getting the current
username. Also remove metrics.yml workflow as it provided no value.
This commit is contained in:
2026-03-17 21:46:09 +01:00
parent c05d987ff1
commit aa59067bb3
4 changed files with 48 additions and 87 deletions
-69
View File
@@ -1,69 +0,0 @@
name: Metrics Collection
on:
schedule:
- cron: '0 0 * * 1' # Weekly on Monday at midnight
workflow_dispatch:
push:
branches: [main, master]
paths:
- 'src/**'
- 'Cargo.toml'
- '.github/workflows/metrics.yml'
env:
CARGO_TERM_COLOR: always
jobs:
collect-metrics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: ./.github/actions/deps
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Generate test coverage
run: |
cargo install cargo-tarpaulin
cargo tarpaulin --out Html --out Lcov --output-dir ./coverage
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: ./coverage
retention-days: 30
- name: Count lines of code
run: |
cargo install tokei
tokei --output json > loc.json
echo "Lines of code:"
tokei --types=Rust
- name: Upload LOC metrics
uses: actions/upload-artifact@v4
with:
name: loc-metrics
path: loc.json
retention-days: 30
- name: Generate dependency graph
run: |
cargo install cargo-depgraph
cargo depgraph --all-features --dedup-transitive-deps --format dot > deps.dot
echo "Dependency graph generated: deps.dot"
echo "Total dependencies: $(cargo tree --depth 0 | wc -l)"
- name: Upload dependency graph
uses: actions/upload-artifact@v4
with:
name: dependency-graph
path: deps.dot
retention-days: 30