fix: update safety command from deprecated 'check' to 'scan'
Some checks failed
audit / audit (push) Successful in 9s
ci-cd / deploy (push) Has been cancelled
ci-cd / build (push) Has been cancelled
ci / deploy (push) Has been cancelled
ci / build (push) Has been cancelled
security-scanning / audit (push) Has been cancelled
test / test (push) Has been cancelled
autofix / fix (push) Has been cancelled

DEPRECATION FIX: Replace deprecated safety check command

Issue: 'safety check' command deprecated, will be unsupported beyond June 2024
Warning: 'DEPRECATED: this command (check) has been DEPRECATED'
Recommendation: Switch to new 'scan' command which is easier and more powerful

Changes:
- Replace 'venv/bin/safety check' with 'venv/bin/safety scan'
- Update debug messages from 'Safety check' to 'Safety scan'
- Maintain all other functionality and error handling
- Apply to all workflows using safety tool

Updated workflows:
- fix.yml: safety scan for dependency security
- security-scanning.yml: safety scan for comprehensive security

Expected results:
- No more deprecation warnings
- Using modern safety scan command
- Same security functionality with improved tool
- Future-proof security scanning

This ensures the workflows use current, supported security tools
and avoid deprecation warnings.
This commit is contained in:
2026-03-27 14:13:58 +01:00
parent b733b03e28
commit 7178c4e951
2 changed files with 3 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ jobs:
# Check for common Python security issues
echo "Running safety check..."
venv/bin/pip install safety
venv/bin/safety check || echo "Safety check completed with warnings"
venv/bin/safety scan || echo "Safety scan completed with warnings"
else
echo "❌ No supported project type found!"
exit 1

View File

@@ -89,8 +89,8 @@ jobs:
echo "✅ Running security scan..."
venv/bin/pip install safety bandit
echo "=== Safety check (dependencies) ==="
venv/bin/safety check || echo "Safety check completed"
echo "=== Safety scan (dependencies) ==="
venv/bin/safety scan || echo "Safety scan completed"
echo "=== Bandit check (code security) ==="
venv/bin/bandit -r . -f json || echo "Bandit scan completed"
else