-
-
Notifications
You must be signed in to change notification settings - Fork 270
Add health score as a ranking factor. #1667
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| """Enums for OWASP projects.""" | ||
|
|
||
| from django.db.models import TextChoices | ||
|
|
||
|
|
||
| class ProjectType(TextChoices): | ||
| """Enum for OWASP project types.""" | ||
|
|
||
| # These projects provide tools, libraries, and frameworks that can be leveraged by | ||
| # developers to enhance the security of their applications. | ||
| CODE = "code", "Code" | ||
|
|
||
| # These projects seek to communicate information or raise awareness about a topic in | ||
| # application security. Note that documentation projects should focus on an online-first | ||
| # deliverable, where appropriate, but can take any media form. | ||
| DOCUMENTATION = "documentation", "Documentation" | ||
|
|
||
| # Some projects fall outside the above categories. Most are created to offer OWASP | ||
| # operational support. | ||
| OTHER = "other", "Other" | ||
|
|
||
| # These are typically software or utilities that help developers and security | ||
| # professionals test, secure, or monitor applications. | ||
| TOOL = "tool", "Tool" | ||
|
Comment on lines
+11
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Wrap enum labels in The second element of each - CODE = "code", "Code"
+ CODE = "code", _("Code")
...
- DOCUMENTATION = "documentation", "Documentation"
+ DOCUMENTATION = "documentation", _("Documentation")
...
- OTHER = "other", "Other"
+ OTHER = "other", _("Other")
...
- TOOL = "tool", "Tool"
+ TOOL = "tool", _("Tool")
@@
- OTHER = "other", "Other"
- INCUBATOR = "incubator", "Incubator"
- LAB = "lab", "Lab"
- PRODUCTION = "production", "Production"
- FLAGSHIP = "flagship", "Flagship"
+ OTHER = "other", _("Other")
+ INCUBATOR = "incubator", _("Incubator")
+ LAB = "lab", _("Lab")
+ PRODUCTION = "production", _("Production")
+ FLAGSHIP = "flagship", _("Flagship")Also applies to: 30-34 🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
| class ProjectLevel(TextChoices): | ||
| """Enum for OWASP project levels.""" | ||
|
|
||
| OTHER = "other", "Other" | ||
| INCUBATOR = "incubator", "Incubator" | ||
| LAB = "lab", "Lab" | ||
| PRODUCTION = "production", "Production" | ||
| FLAGSHIP = "flagship", "Flagship" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add
gettext_lazyimport for translatable labelsDjango convention is to wrap human-readable enum labels in
gettext_lazyso they can be picked up by the i18n tooling.Importing it here avoids repeating the import in every consumer that needs translations.
📝 Committable suggestion
🤖 Prompt for AI Agents