Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect mark_safe usages in decorators #9887

Merged
merged 1 commit into from Feb 8, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

Django's mark_safe can also be used as a decorator, so we should detect usages of @mark_safe for the purpose of the relevant Bandit rule.

Closes #9780.

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Feb 8, 2024
Copy link

github-actions bot commented Feb 8, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh merged commit f76a3e8 into main Feb 8, 2024
17 checks passed
@charliermarsh charliermarsh deleted the charlie/mark_safe branch February 8, 2024 04:10
nkxxll pushed a commit to nkxxll/ruff that referenced this pull request Mar 10, 2024
## Summary

Django's `mark_safe` can also be used as a decorator, so we should
detect usages of `@mark_safe` for the purpose of the relevant Bandit
rule.

Closes astral-sh#9780.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S308 (mark_safe) doesn't detects decorator usage and imports from another place
1 participant