Skip to content

Commit

Permalink
update all codemod summary fields
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Oct 13, 2023
1 parent 8fa8463 commit 1d0f8b4
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/core_codemods/django_debug_flag_on.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class DjangoDebugFlagOn(SemgrepCodemod, Codemod):
METADATA = CodemodMetadata(
DESCRIPTION=("Flips django's debug flag if on."),
DESCRIPTION="Flip Django Debug Flag to Off",
NAME="django-debug-flag-on",
REVIEW_GUIDANCE=ReviewGuidance.MERGE_AFTER_CURSORY_REVIEW,
REFERENCES=[
Expand All @@ -29,7 +29,7 @@ class DjangoDebugFlagOn(SemgrepCodemod, Codemod):
},
],
)
SUMMARY = CHANGE_DESCRIPTION = "Flip Django debug flag to off"
SUMMARY = CHANGE_DESCRIPTION = METADATA. DESCRIPTION
YAML_FILES = [
"django-debug-flag-on.yaml",
]
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/django_session_cookie_secure_off.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class DjangoSessionCookieSecureOff(SemgrepCodemod, Codemod):
METADATA = CodemodMetadata(
DESCRIPTION=("Sets Django's `SESSION_COOKIE_SECURE` flag if off or missing."),
DESCRIPTION=("Sets Django's `SESSION_COOKIE_SECURE` Flag if Off or Missing."),
NAME="django-session-cookie-secure-off",
REVIEW_GUIDANCE=ReviewGuidance.MERGE_AFTER_REVIEW,
REFERENCES=[
Expand Down
4 changes: 2 additions & 2 deletions src/core_codemods/enable_jinja2_autoescape.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
class EnableJinja2Autoescape(SemgrepCodemod):
NAME = "enable-jinja2-autoescape"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_AFTER_CURSORY_REVIEW
SUMMARY = "Enable jinja2 autoescape"
DESCRIPTION = "Makes the `autoescape` parameter to jinja2.Environment be `True`."
SUMMARY = "Enable Jinja2 Autoescape"
DESCRIPTION = "Sets the `autoescape` parameter in jinja2.Environment to `True`."
REFERENCES = [
{"url": "https://owasp.org/www-community/attacks/xss/", "description": ""},
{
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/harden_pyyaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class HardenPyyaml(SemgrepCodemod):
NAME = "harden-pyyaml"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Use SafeLoader when loading YAML"
SUMMARY = "Use SafeLoader in `yaml.load()` Calls"
DESCRIPTION = "Ensures all calls to yaml.load use `SafeLoader`."
REFERENCES = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/harden_ruamel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class HardenRuamel(SemgrepCodemod):
NAME = "harden-ruamel"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Use safe YAML loading in ruamel.yaml"
SUMMARY = "Use `typ='safe'` in ruamel.yaml() Calls"
DESCRIPTION = "Ensures all unsafe calls to ruamel.yaml.YAML use `typ='safe'`."
REFERENCES = [
{
Expand Down
4 changes: 2 additions & 2 deletions src/core_codemods/https_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

class HTTPSConnection(BaseCodemod, Codemod):
METADATA = CodemodMetadata(
DESCRIPTION=("Enforce HTTPS connection"),
DESCRIPTION="Enforce HTTPS Connection for urllib3",
NAME="https-connection",
REVIEW_GUIDANCE=ReviewGuidance.MERGE_WITHOUT_REVIEW,
REFERENCES=[
Expand All @@ -36,7 +36,7 @@ class HTTPSConnection(BaseCodemod, Codemod):
},
],
)
CHANGE_DESCRIPTION = "Enforce HTTPS connection"
CHANGE_DESCRIPTION = METADATA.DESCRIPTION
SUMMARY = "Changes HTTPConnectionPool to HTTPSConnectionPool to enforce secure connection."

METADATA_DEPENDENCIES = (PositionProvider,)
Expand Down
4 changes: 2 additions & 2 deletions src/core_codemods/jwt_decode_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
class JwtDecodeVerify(SemgrepCodemod):
NAME = "jwt-decode-verify"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Enable all verifications in `jwt.decode` call."
DESCRIPTION = "Makes any of the multiple `verify` parameters to a `jwt.decode` call be `True`."
SUMMARY = "Verify JWT Decode"
DESCRIPTION = "Enable all verifications in `jwt.decode` call."
REFERENCES = [
{"url": "https://pyjwt.readthedocs.io/en/stable/api.html", "description": ""},
{
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/limit_readline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class LimitReadline(SemgrepCodemod):
NAME = "limit-readline"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_AFTER_CURSORY_REVIEW
SUMMARY = "Limit the size of readline() calls"
SUMMARY = "Limit readline()"
DESCRIPTION = "Adds a size limit argument to readline() calls."
REFERENCES = [
{"url": "https://cwe.mitre.org/data/definitions/400.html", "description": ""}
Expand Down
4 changes: 2 additions & 2 deletions src/core_codemods/lxml_safe_parser_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
class LxmlSafeParserDefaults(SemgrepCodemod):
NAME = "safe-lxml-parser-defaults"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Use Safe Defaults for lxml Parsers"
DESCRIPTION = "Replace lxml parser parameters with safe defaults"
SUMMARY = "Use Safe Defaults for `lxml` Parsers"
DESCRIPTION = "Replace `lxml` parser parameters with safe defaults"
REFERENCES = [
{
"url": "https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XMLParser",
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/lxml_safe_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class LxmlSafeParsing(SemgrepCodemod):
NAME = "safe-lxml-parsing"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Use safe parsers in lxml parsing functions"
SUMMARY = "Use Safe Parsers in `lxml` Parsing Functions"
DESCRIPTION = (
"Call `lxml.etree.parse` and `lxml.etree.fromstring` with a safe parser"
)
Expand Down
4 changes: 2 additions & 2 deletions src/core_codemods/order_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

class OrderImports(BaseCodemod, Codemod):
METADATA = CodemodMetadata(
DESCRIPTION=("Formats and order imports by categories"),
DESCRIPTION=("Formats and orders imports by categories"),
NAME="order-imports",
REVIEW_GUIDANCE=ReviewGuidance.MERGE_WITHOUT_REVIEW,
REFERENCES=[],
)
SUMMARY = "Order imports by categories"
SUMMARY = "Order Imports"
CHANGE_DESCRIPTION = "Ordered and formatted import block below this line"

METADATA_DEPENDENCIES = (PositionProvider,)
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/process_creation_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ProcessSandbox(SemgrepCodemod):
NAME = "sandbox-process-creation"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_AFTER_CURSORY_REVIEW
SUMMARY = "Sandbox process creation"
SUMMARY = "Sandbox Process Creation"
DESCRIPTION = (
"Replaces subprocess.{func} with more secure safe_command library functions."
)
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/remove_unnecessary_f_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class RemoveUnnecessaryFStr(BaseCodemod, UnnecessaryFormatString):
NAME = "remove-unnecessary-f-str"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Remove unnecessary f-strings"
SUMMARY = "Remove Unnecessary F-strings"
DESCRIPTION = UnnecessaryFormatString.DESCRIPTION
REFERENCES = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/remove_unused_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RemoveUnusedImports(BaseCodemod, Codemod):
REVIEW_GUIDANCE=ReviewGuidance.MERGE_WITHOUT_REVIEW,
REFERENCES=[],
)
SUMMARY = "Remove unused imports from a module"
SUMMARY = "Remove Unused Imports"
CHANGE_DESCRIPTION = "Unused import."

METADATA_DEPENDENCIES = (
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/requests_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class RequestsVerify(SemgrepCodemod):
NAME = "requests-verify"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_AFTER_CURSORY_REVIEW
SUMMARY = "Verify SSL certificates when making requests."
SUMMARY = "Verify SSL Certificates for Requests."
DESCRIPTION = (
"Makes any calls to requests.{func} with `verify=False` to `verify=True`"
)
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/secure_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class SecureRandom(SemgrepCodemod):
NAME = "secure-random"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Use secrets.SystemRandom() instead of random"
SUMMARY = "Secure Source of Randomness"
DESCRIPTION = "Replaces random.{func} with more secure secrets library functions."
REFERENCES = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/tempfile_mktemp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class TempfileMktemp(SemgrepCodemod):
NAME = "secure-tempfile"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Use `tempfile.mkstemp` instead of `tempfile.mktemp`"
SUMMARY = "Upgrade and Secure Temp File Creation"
DESCRIPTION = "Replaces `tempfile.mktemp` with `tempfile.mkstemp`."
REFERENCES = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/upgrade_sslcontext_minimum_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class UpgradeSSLContextMinimumVersion(SemgrepCodemod):
NAME = "upgrade-sslcontext-minimum-version"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW
SUMMARY = "Upgrade minimum SSL/TLS version for SSLContext"
SUMMARY = "Upgrade SSLContext Minimum Version"
DESCRIPTION = "Replaces minimum SSL/TLS version for SSLContext"
REFERENCES = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/upgrade_sslcontext_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UpgradeSSLContextTLS(SemgrepCodemod, BaseTransformer):
},
],
)
SUMMARY = "Replace known insecure TLS/SSL protocol versions in SSLContext with secure ones"
SUMMARY = "Upgrade TLS Version In SSLContext"
CHANGE_DESCRIPTION = "Upgrade to use a safe version of TLS in SSLContext"
YAML_FILES = [
"upgrade_sslcontext_tls.yaml",
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/url_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class UrlSandbox(SemgrepCodemod, Codemod):
},
],
)
SUMMARY = "Ensure that requests are made safely."
SUMMARY = "Sandbox URL Creation"
CHANGE_DESCRIPTION = "Switch use of requests for security.safe_requests"
YAML_FILES = [
"sandbox_url_creation.yaml",
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/use_walrus_if.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UseWalrusIf(SemgrepCodemod):
ScopeProvider,
)
NAME = "use-walrus-if"
SUMMARY = "Use Assignment Expression in Conditional"
SUMMARY = "Use Assignment Expression (Walrus) In Conditional"
REVIEW_GUIDANCE = ReviewGuidance.MERGE_AFTER_CURSORY_REVIEW
DESCRIPTION = (
"Replaces multiple expressions involving `if` operator with 'walrus' operator"
Expand Down
4 changes: 2 additions & 2 deletions src/core_codemods/with_threading_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

class WithThreadingLock(SemgrepCodemod):
NAME = "bad-lock-with-statement"
SUMMARY = "Replace deprecated usage of threading lock classes as context managers"
SUMMARY = "Separate Lock Instantiation from `with` Call"
DESCRIPTION = "Replace deprecated usage of threading lock classes as context managers."
REVIEW_GUIDANCE = ReviewGuidance.MERGE_AFTER_CURSORY_REVIEW
DESCRIPTION = "Separates threading lock instantiation and call with `with` statement into two steps."
REFERENCES = [
{
"url": "https://pylint.pycqa.org/en/latest/user_guide/messages/warning/useless-with-lock.",
Expand Down

0 comments on commit 1d0f8b4

Please sign in to comment.