deprecated-api-updater — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited deprecated-api-updater (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Identify and replace deprecated API usage with modern alternatives automatically.
Scan code to identify deprecated API usage:
# Scan a single file
python scripts/detect_deprecated_apis.py src/app.py
# Scan entire directory
python scripts/detect_deprecated_apis.py src/
# Specify language explicitly
python scripts/detect_deprecated_apis.py legacy/ --language python
# Output as JSON
python scripts/detect_deprecated_apis.py src/ --format jsonAutomatically replace deprecated APIs:
# Dry run (preview changes)
python scripts/replace_deprecated_apis.py src/ --dry-run
# Apply replacements (creates .bak backups)
python scripts/replace_deprecated_apis.py src/
# Replace in specific language
python scripts/replace_deprecated_apis.py src/ --language javascriptSee [python_deprecations.md](references/python_deprecations.md) for complete reference.
See [javascript_deprecations.md](references/javascript_deprecations.md) for complete reference.
See [java_deprecations.md](references/java_deprecations.md) for complete reference.
For Python and JavaScript, the skill uses Abstract Syntax Tree parsing for accurate detection:
Example: Detects os.popen() by analyzing the AST node structure, not just string matching.
For all languages, regex-based pattern matching provides fast detection:
Both methods are used together for comprehensive detection.
Run detection to identify deprecated APIs:
python scripts/detect_deprecated_apis.py src/Output example:
Found 3 deprecated API usage(s):
📍 src/utils.py:5:0
Deprecated: collections.Mapping
Replacement: collections.abc.Mapping
Context: from collections import Mapping
Detection: ast
📍 src/legacy.py:12:9
Deprecated: os.popen()
Replacement: subprocess.run() or subprocess.Popen()
Context: result = os.popen('ls')
Detection: astExamine the detected deprecations and suggested replacements. Check the reference documentation for detailed migration guides.
Preview changes before applying:
python scripts/replace_deprecated_apis.py src/ --dry-runOutput shows:
Apply changes with automatic backups:
python scripts/replace_deprecated_apis.py src/Creates:
.bak backup files for all modified filesCritical: Always validate after replacement:
# Run tests
npm test # JavaScript
pytest # Python
mvn test # Java
# Run linters
eslint src/ # JavaScript
flake8 src/ # Python
mvn checkstyle # Java
# Manual testing
# Test critical functionalityOnce validated:
# Review changes
git diff
# Commit
git add .
git commit -m "Replace deprecated APIs with modern alternatives"
# Remove backup files
find . -name "*.bak" -deletegit checkout -b fix/deprecated-apis.bak files until validatedDeprecations:
django.conf.urls.url → django.urls.pathforce_text() → force_str()ugettext → gettextProcess:
# Detect Django-specific deprecations
python scripts/detect_deprecated_apis.py myproject/ --language python
# Preview replacements
python scripts/replace_deprecated_apis.py myproject/ --dry-run
# Apply
python scripts/replace_deprecated_apis.py myproject/
# Test
python manage.py testDeprecations:
ReactDOM.render() → ReactDOM.createRoot()Process:
# Detect React deprecations
python scripts/detect_deprecated_apis.py src/ --language javascript
# Manual review needed for complex cases
# Some React upgrades require structural changes
# Apply simple replacements
python scripts/replace_deprecated_apis.py src/ --dry-run
python scripts/replace_deprecated_apis.py src/
# Test
npm test
npm start # Manual testingDeprecations:
collections.Mapping → collections.abc.Mappingtime.clock() → time.perf_counter()os.popen() → subprocess.run()Process:
# Scan codebase
python scripts/detect_deprecated_apis.py . --language python --format json > deprecations.json
# Review JSON output
cat deprecations.json
# Apply replacements
python scripts/replace_deprecated_apis.py . --dry-run
python scripts/replace_deprecated_apis.py .
# Run tests
pytestAlways manually review replacements for:
importlib.import_module('collections').Mappingimport collections as c; c.MappingProblem: Deprecations not detected
Solutions:
--language flag explicitlyProblem: False positives
Solutions:
Problem: Replacement breaks code
Solutions:
.bak filesProblem: Tests fail after replacement
Solutions:
Each guide includes:
To add custom deprecation patterns, edit the scripts:
`scripts/detect_deprecated_apis.py`:
DEPRECATION_PATTERNS = {
'python': [
# Add your patterns
(r'your\.deprecated\.api\(', 'your.deprecated.api()', 'modern.api()'),
]
}`scripts/replace_deprecated_apis.py`:
REPLACEMENT_RULES = {
'python': [
# Add your replacements
(r'your\.deprecated\.api\(', r'modern.api(', 'deprecated', 'modern'),
]
}Detect deprecations in CI:
# .github/workflows/deprecation-check.yml
name: Check Deprecations
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for deprecated APIs
run: |
python scripts/detect_deprecated_apis.py src/ --format json > deprecations.json
if [ -s deprecations.json ]; then
echo "Deprecated APIs found!"
cat deprecations.json
exit 1
fiProcess multiple projects:
#!/bin/bash
for project in project1 project2 project3; do
echo "Processing $project..."
python scripts/detect_deprecated_apis.py "$project/src" > "$project-report.txt"
python scripts/replace_deprecated_apis.py "$project/src" --dry-run
done~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.