From 7178c4e9511038b150154fdc7c594d4c0c7fb554 Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Fri, 27 Mar 2026 14:13:58 +0100 Subject: [PATCH] fix: update safety command from deprecated 'check' to 'scan' 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. --- .gitea/workflows/fix.yml | 2 +- .gitea/workflows/security-scanning.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/fix.yml b/.gitea/workflows/fix.yml index 1c2256a6..cffe7868 100644 --- a/.gitea/workflows/fix.yml +++ b/.gitea/workflows/fix.yml @@ -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 diff --git a/.gitea/workflows/security-scanning.yml b/.gitea/workflows/security-scanning.yml index cb207c9c..6a12af8f 100644 --- a/.gitea/workflows/security-scanning.yml +++ b/.gitea/workflows/security-scanning.yml @@ -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