Semgrep Audit Rules¶
The audit phase (Phase 6) runs 35+ semgrep rules to detect issues that cannot be auto-fixed and need manual attention. Install with pip install plone-codemod[audit].
Rules are defined in src/plone_codemod/semgrep_rules/plone6_deprecated.yaml.
Deprecated Imports (ERROR)¶
Rule ID |
Pattern |
Replacement |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Deprecated Function Calls (WARNING)¶
Rule ID |
Pattern |
Replacement |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Removed APIs (ERROR)¶
Rule ID |
Pattern |
Replacement |
|---|---|---|
|
|
|
|
|
|
|
|
|
ZCML / GenericSetup XML (WARNING)¶
Rule ID |
Pattern |
Files |
|---|---|---|
|
|
|
|
|
|
|
|
|
Page Template Issues¶
Rule ID |
Pattern |
Severity |
Fix |
|---|---|---|---|
|
|
ERROR |
Use |
|
|
ERROR |
Use |
|
|
ERROR |
Use |
|
|
ERROR |
Use |
|
|
WARNING |
Use |
|
|
ERROR |
Use |
|
|
ERROR |
Use |
|
|
WARNING |
Use |
|
|
WARNING |
Use |
|
|
WARNING |
Use |
|
|
ERROR |
Use |
|
|
WARNING |
Use |
|
|
WARNING |
Use Python stdlib |
Bootstrap 3 Detection (WARNING)¶
Rule ID |
Pattern |
Files |
Fix |
|---|---|---|---|
|
|
|
Use Bootstrap Icons or |
|
|
|
Run with |
|
|
|
Run with |
Standalone Usage¶
You can run the semgrep rules independently:
semgrep --config src/plone_codemod/semgrep_rules/ /path/to/your/src/