@critiq/rules 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +468 -0
- package/README.md +13 -232
- package/catalog-metadata.json +47 -0
- package/catalog.yaml +4459 -1008
- package/package.json +1 -1
- package/rules/cfn/cfn.correctness.attributedefinitions-keyschemas-mismatch.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.base64-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.basic-cloudformation-resource-check.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.basic-cloudformation-template-configuration.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.cannot-reference-resources-in-the-conditions-block-of-the-template.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-at-least-one-essential-container-is-specified.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-deletionpolicy-values-for-resources.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-dependson-values-for-resources.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-ec2-ebs-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-elastic-cache-redis-cluster-settings.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-events-rule-targets-are-less-than-or-equal-to-5.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-fargate-service-scheduling-strategy.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-fn-and-structure-for-validity.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-fn-equals-structure-for-validity.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-fn-if-structure-for-validity.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-fn-not-structure-for-validity.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-fn-or-structure-for-validity.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-for-subscriptionfilters-have-beyond-2-attachments-to-a-cloudwatch-log-group.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-a-json-object-is-within-size-limits.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-a-list-has-between-min-and-max-number-of-values-specified.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-a-list-has-duplicate-values.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-a-number-is-between-min-and-max.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-a-string-has-between-min-and-max-number-of-values-specified.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-eol-lambda-function-runtimes-are-used.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-properties-have-a-valid-value.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-property-values-adhere-to-a-specific-pattern.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-refing-to-a-iam-resource-with-path-set.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-refs-exist.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-serverless-resources-have-serverless-transform.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-if-the-referenced-conditions-are-defined.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-minimum-90-period-is-met-between-backupplan-cold-and-delete.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-properties-that-are-mutually-exclusive.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-properties-that-are-required-together.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-properties-that-need-at-least-one-of-a-list-of-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-properties-that-need-only-one-of-a-list-of-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-resource-properties-values.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-state-machine-definition-for-proper-syntax.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-that-modules-resources-are-valid.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-the-configuration-of-a-resources-updatepolicy.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-updatereplacepolicy-values-for-resources.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.check-values-of-properties-for-valid-refs-and-getatts.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.cidr-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.cloudfront-aliases.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.codepipeline-stage-actions.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.codepipeline-stages.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.conditions-have-appropriate-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.default-value-cannot-use-refs.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.default-value-is-within-parameter-constraints.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.error-processing-rule-on-the-template.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.findinmap-validation-of-configuration.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.getatt-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.getaz-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.importvalue-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.join-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.length-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.mapping-attribute-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.mapping-keys-are-strings-and-alphanumeric.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.mapping-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.mapping-name-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.mappings-are-appropriately-configured.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.mappings-have-appropriate-names.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.metadata-interface-have-appropriate-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.output-description-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.output-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.output-name-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.outputs-descriptions-can-only-be-strings.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.outputs-have-appropriate-names.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.outputs-have-appropriate-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.outputs-have-required-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.outputs-have-values-of-strings.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.parameter-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.parameter-name-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.parameter-value-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.parameters-have-appropriate-names.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.parameters-have-appropriate-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.parameters-have-appropriate-type.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.property-is-required-based-on-another-properties-value.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.property-is-unwanted-based-on-another-properties-value.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.rds-instance-type-is-compatible-with-the-rds-type.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.recordset-hostedzonename-is-a-superdomain-of-name.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.ref-validation-of-value.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.required-resource-properties-are-missing.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resource-dependencies-are-not-circular.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resource-ec2-security-group-ingress-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resource-elb-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resource-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resource-name-limit-not-exceeded.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resource-properties-are-invalid.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resource-schema.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resource-subnetroutetableassociation-properties.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.resources-have-appropriate-names.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.select-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.snapstart-supports-the-configured-runtime.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.split-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.sub-is-required-if-a-variable-is-used-in-a-string.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.sub-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.template-description-can-only-be-a-string.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.template-description-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.template-size-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.tojsonstring-validation-of-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.unique-resource-and-parameter-names.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.validate-accesscontrol-are-set-with-ownershipcontrols.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.validate-aws-event-scheduleexpression-format.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.validate-parameters-for-in-a-nested-stack.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.validate-route53-recordsets.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.validate-the-configuration-of-the-metadata-section.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.validates-foreach-functions.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.validation-not-function-configuration.rule.yaml +49 -0
- package/rules/cfn/cfn.correctness.validationdomain-is-superdomain-of-domainname.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.arns-should-use-correctly-placed-pseudo-parameters.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.availability-zone-parameters-should-not-be-hardcoded.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-iam-resource-policies-syntax.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-if-a-list-that-allows-duplicates-has-any-duplicates.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-if-conditions-are-used.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-if-eol-lambda-function-runtimes-are-used-w2531.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-if-imageid-parameters-have-the-correct-type.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-if-mappings-are-used.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-if-parameters-are-used.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-if-parameters-have-a-valid-value-based-on-an-allowed-pattern.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-if-parameters-have-a-valid-value.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-obsolete-dependson-configuration-for-resources.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-outputs-using-importvalue.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-required-properties-for-lambda-if-the-deployment-package-is-a-zip-file.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-resources-with-auto-expiring-content-have-explicit-retention-period.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-resources-with-updatereplacepolicy-deletionpolicy-have-both.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.check-stateful-resources-have-a-set-updatereplacepolicy-deletionpolicy.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.checks-for-legacy-instance-type-generations.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.findinmap-keys-exist-in-the-map.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.fn-equals-will-always-return-true-or-false.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.mapping-attribute-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.mapping-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.mapping-name-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.metadata-interface-parameters-exist.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.output-description-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.output-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.output-name-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.parameter-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.parameter-memory-size-attributes-should-have-max-and-min.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.parameter-name-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.parameter-value-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.ref-getatt-to-resource-that-is-available-when-conditions-are-applied.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.resource-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.resource-name-limit.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.sub-isn-t-needed-if-it-doesn-t-have-a-variable-defined.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.sub-validation-of-parameters-w1019.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.template-description-limit-i1003.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.template-size-limit-i1002.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.use-sub-instead-of-join.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.validate-that-snapstart-is-configured-for-java11-runtimes.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.validate-that-snapstart-is-properly-configured.rule.yaml +49 -0
- package/rules/cfn/cfn.maintainability.warn-when-properties-are-configured-to-only-work-with-the-package-command.rule.yaml +49 -0
- package/rules/cfn/cfn.security.check-dynamic-references-secure-strings-are-in-supported-locations.rule.yaml +53 -0
- package/rules/cfn/cfn.security.check-for-noecho-references.rule.yaml +53 -0
- package/rules/cfn/cfn.security.check-iam-permission-configuration.rule.yaml +53 -0
- package/rules/cfn/cfn.security.check-if-iam-policies-are-properly-configured.rule.yaml +53 -0
- package/rules/cfn/cfn.security.check-if-password-properties-are-correctly-configured.rule.yaml +53 -0
- package/rules/cfn/cfn.security.controlling-access-to-an-s3-bucket-should-be-done-with-bucket-policies.rule.yaml +53 -0
- package/rules/go/go.bug-risk.compound-assignment-misuse.rule.yaml +53 -0
- package/rules/go/go.bug-risk.deprecated-redis-methods.rule.yaml +57 -0
- package/rules/go/go.bug-risk.etcd-getlogger-misuse.rule.yaml +59 -0
- package/rules/go/go.bug-risk.etcd-invalid-compare-operator.rule.yaml +53 -0
- package/rules/go/go.bug-risk.gin-loadhtmlglob-ill-formed.rule.yaml +53 -0
- package/rules/go/go.bug-risk.gorm-dry-run-enabled.rule.yaml +58 -0
- package/rules/go/go.bug-risk.gorm-skip-default-transaction.rule.yaml +57 -0
- package/rules/go/go.bug-risk.gorm-updates-zero-values.rule.yaml +55 -0
- package/rules/go/go.bug-risk.gorm-where-zero-values.rule.yaml +53 -0
- package/rules/go/go.bug-risk.poorly-formed-nilness-guards.rule.yaml +57 -0
- package/rules/go/go.bug-risk.redis-incorrect-arg-count.rule.yaml +54 -0
- package/rules/go/go.bug-risk.redis-unimplemented-method.rule.yaml +53 -0
- package/rules/go/go.bug-risk.reflect-makefunc-usage.rule.yaml +55 -0
- package/rules/go/go.correctness.bare-return.rule.yaml +52 -0
- package/rules/go/go.correctness.boolean-literal-in-expression.rule.yaml +52 -0
- package/rules/go/go.correctness.boolean-simplification.rule.yaml +49 -0
- package/rules/go/go.correctness.deferred-func-literal.rule.yaml +52 -0
- package/rules/go/go.correctness.duplicate-branch-body.rule.yaml +49 -0
- package/rules/go/go.correctness.duplicate-function-arguments.rule.yaml +49 -0
- package/rules/go/go.correctness.duplicate-if-else-condition.rule.yaml +54 -0
- package/rules/go/go.correctness.duplicate-switch-cases.rule.yaml +48 -0
- package/rules/go/go.correctness.flag-pointer-immediate-deref.rule.yaml +49 -0
- package/rules/go/go.correctness.hidden-goroutine.rule.yaml +55 -0
- package/rules/go/go.correctness.http-nobody-nil.rule.yaml +52 -0
- package/rules/go/go.correctness.identical-binary-operands.rule.yaml +48 -0
- package/rules/go/go.correctness.impossible-interface-nil-check.rule.yaml +56 -0
- package/rules/go/go.correctness.incomplete-nil-check.rule.yaml +49 -0
- package/rules/go/go.correctness.integer-truncation.rule.yaml +51 -0
- package/rules/go/go.correctness.interface-any-preferred.rule.yaml +50 -0
- package/rules/go/go.correctness.nil-error-returned.rule.yaml +49 -0
- package/rules/go/go.correctness.off-by-one-index.rule.yaml +48 -0
- package/rules/go/go.correctness.redundant-type-declaration.rule.yaml +51 -0
- package/rules/go/go.correctness.signedness-casting.rule.yaml +56 -0
- package/rules/go/go.correctness.string-concat-simplify.rule.yaml +52 -0
- package/rules/go/go.correctness.suspicious-regex-pattern.rule.yaml +49 -0
- package/rules/go/go.correctness.terminal-call-with-defer.rule.yaml +50 -0
- package/rules/go/go.correctness.unexported-capital-name.rule.yaml +52 -0
- package/rules/go/go.correctness.unnecessary-dereference.rule.yaml +53 -0
- package/rules/go/go.correctness.unnecessary-else-return.rule.yaml +52 -0
- package/rules/go/go.correctness.unreachable-switch-case.rule.yaml +50 -0
- package/rules/go/go.doc.malformed-deprecated-comment.rule.yaml +59 -0
- package/rules/go/go.performance.avoid-large-loop-copy.rule.yaml +38 -0
- package/rules/go/go.performance.avoid-large-param-copy.rule.yaml +38 -0
- package/rules/go/go.performance.avoid-large-range-copy.rule.yaml +37 -0
- package/rules/go/go.performance.avoid-string-index-alloc.rule.yaml +38 -0
- package/rules/go/go.performance.combine-append-calls.rule.yaml +38 -0
- package/rules/go/go.performance.fmt-fprint.rule.yaml +44 -0
- package/rules/go/go.performance.iowriter-write-string.rule.yaml +45 -0
- package/rules/go/go.performance.non-idiomatic-slice-zeroing.rule.yaml +44 -0
- package/rules/go/go.performance.reorder-operands.rule.yaml +44 -0
- package/rules/go/go.performance.utf8-decode-rune.rule.yaml +44 -0
- package/rules/go/go.security.decompression-bomb.rule.yaml +55 -0
- package/rules/go/go.security.http-dir-path-traversal.rule.yaml +55 -0
- package/rules/go/go.security.incomplete-hostname-regex.rule.yaml +64 -0
- package/rules/go/go.security.insecure-ssl-protocol.rule.yaml +2 -0
- package/rules/go/go.security.jwt-without-verification.rule.yaml +2 -0
- package/rules/go/go.security.net-http-missing-timeouts.rule.yaml +3 -0
- package/rules/go/go.security.pprof-exposed.rule.yaml +2 -0
- package/rules/go/go.security.squirrel-unsafe-quoting.rule.yaml +64 -0
- package/rules/go/go.security.tainted-value-sink.rule.yaml +59 -0
- package/rules/go/go.security.tls-missing-min-version.rule.yaml +2 -0
- package/rules/go/go.security.unsafe-defer-close.rule.yaml +55 -0
- package/rules/go/go.security.weak-crypto-import.rule.yaml +3 -0
- package/rules/go/go.security.weak-file-permission.rule.yaml +56 -0
- package/rules/java/java.correctness.annotation-check-always-false.rule.yaml +42 -0
- package/rules/java/java.correctness.array-compared-to-non-array.rule.yaml +45 -0
- package/rules/java/java.correctness.array-index-bounds.rule.yaml +42 -0
- package/rules/java/java.correctness.assert-self-comparison.rule.yaml +46 -0
- package/rules/java/java.correctness.assertion-in-production.rule.yaml +49 -0
- package/rules/java/java.correctness.bad-short-circuit-null-check.rule.yaml +45 -0
- package/rules/java/java.correctness.bitwise-or-never-equal.rule.yaml +42 -0
- package/rules/java/java.correctness.boxed-boolean-conditional.rule.yaml +42 -0
- package/rules/java/java.correctness.cacheloader-null-return.rule.yaml +42 -0
- package/rules/java/java.correctness.case-insensitive-regex-lacks-unicode.rule.yaml +46 -0
- package/rules/java/java.correctness.catch-null-pointer.rule.yaml +5 -1
- package/rules/java/java.correctness.class-isinstance-on-class.rule.yaml +42 -0
- package/rules/java/java.correctness.class-name-collision.rule.yaml +45 -0
- package/rules/java/java.correctness.clone-without-super.rule.yaml +45 -0
- package/rules/java/java.correctness.closeable-provides-injection.rule.yaml +43 -0
- package/rules/java/java.correctness.collection-adds-self.rule.yaml +42 -0
- package/rules/java/java.correctness.collection-contains-self.rule.yaml +42 -0
- package/rules/java/java.correctness.collection-remove-type-mismatch.rule.yaml +42 -0
- package/rules/java/java.correctness.comparator-downcast-sign-flip.rule.yaml +42 -0
- package/rules/java/java.correctness.compareto-min-value.rule.yaml +44 -0
- package/rules/java/java.correctness.constructor-starts-thread.rule.yaml +45 -0
- package/rules/java/java.correctness.default-package-spring-scan.rule.yaml +46 -0
- package/rules/java/java.correctness.deprecated-thread-methods.rule.yaml +42 -0
- package/rules/java/java.correctness.double-assignment.rule.yaml +42 -0
- package/rules/java/java.correctness.double-checked-locking.rule.yaml +42 -0
- package/rules/java/java.correctness.duplicate-binary-argument.rule.yaml +45 -0
- package/rules/java/java.correctness.duration-with-nanos-misuse.rule.yaml +42 -0
- package/rules/java/java.correctness.enum-equals-method.rule.yaml +45 -0
- package/rules/java/java.correctness.enum-get-class.rule.yaml +42 -0
- package/rules/java/java.correctness.equals-inherits-parent.rule.yaml +45 -0
- package/rules/java/java.correctness.equals-null-check.rule.yaml +45 -0
- package/rules/java/java.correctness.equals-null.rule.yaml +45 -0
- package/rules/java/java.correctness.equals-on-array.rule.yaml +4 -0
- package/rules/java/java.correctness.explicit-finalizer-invocation.rule.yaml +45 -0
- package/rules/java/java.correctness.for-loop-mismatched-increment.rule.yaml +45 -0
- package/rules/java/java.correctness.getter-setter-sync-mismatch.rule.yaml +42 -0
- package/rules/java/java.correctness.hashcode-on-array.rule.yaml +42 -0
- package/rules/java/java.correctness.hashtable-contains-value.rule.yaml +42 -0
- package/rules/java/java.correctness.hasnext-invokes-next.rule.yaml +45 -0
- package/rules/java/java.correctness.ignored-inputstream-read.rule.yaml +45 -0
- package/rules/java/java.correctness.ignored-inputstream-skip.rule.yaml +45 -0
- package/rules/java/java.correctness.illegal-monitor-state-caught.rule.yaml +45 -0
- package/rules/java/java.correctness.impossible-toarray-downcast.rule.yaml +45 -0
- package/rules/java/java.correctness.incorrect-main-signature.rule.yaml +42 -0
- package/rules/java/java.correctness.indexof-reversed-arguments.rule.yaml +42 -0
- package/rules/java/java.correctness.instant-unsupported-temporal-unit.rule.yaml +42 -0
- package/rules/java/java.correctness.invalid-regex-literal.rule.yaml +45 -0
- package/rules/java/java.correctness.invalid-serial-version-uid.rule.yaml +42 -0
- package/rules/java/java.correctness.invalid-time-constants.rule.yaml +42 -0
- package/rules/java/java.correctness.invalidated-iterator.rule.yaml +42 -0
- package/rules/java/java.correctness.iterable-iterator-returns-this.rule.yaml +44 -0
- package/rules/java/java.correctness.iterable-path-type.rule.yaml +42 -0
- package/rules/java/java.correctness.jump-in-finally.rule.yaml +44 -0
- package/rules/java/java.correctness.loop-condition-never-true.rule.yaml +42 -0
- package/rules/java/java.correctness.lost-increment-in-assignment.rule.yaml +45 -0
- package/rules/java/java.correctness.math-max-min-swapped.rule.yaml +45 -0
- package/rules/java/java.correctness.missing-enum-switch-elements.rule.yaml +43 -0
- package/rules/java/java.correctness.modulus-multiplication-precedence.rule.yaml +42 -0
- package/rules/java/java.correctness.mutable-data-exposed.rule.yaml +42 -0
- package/rules/java/java.correctness.mutable-enum-fields.rule.yaml +44 -0
- package/rules/java/java.correctness.nan-comparison.rule.yaml +42 -0
- package/rules/java/java.correctness.ncopies-argument-order.rule.yaml +42 -0
- package/rules/java/java.correctness.noallocation-method-creates-object.rule.yaml +45 -0
- package/rules/java/java.correctness.non-final-immutable-fields.rule.yaml +45 -0
- package/rules/java/java.correctness.non-null-method-returns-null.rule.yaml +43 -0
- package/rules/java/java.correctness.non-terminating-loop.rule.yaml +42 -0
- package/rules/java/java.correctness.oddness-check-fails-negative.rule.yaml +45 -0
- package/rules/java/java.correctness.optional-get-without-present-check.rule.yaml +44 -0
- package/rules/java/java.correctness.optional-null.rule.yaml +42 -0
- package/rules/java/java.correctness.overloaded-equals.rule.yaml +45 -0
- package/rules/java/java.correctness.parameter-reassignment.rule.yaml +46 -0
- package/rules/java/java.correctness.possible-null-access-exception.rule.yaml +42 -0
- package/rules/java/java.correctness.possible-null-access.rule.yaml +42 -0
- package/rules/java/java.correctness.prepared-statement-in-loop.rule.yaml +52 -0
- package/rules/java/java.correctness.prepared-statement-index-zero.rule.yaml +44 -0
- package/rules/java/java.correctness.random-coerced-to-zero.rule.yaml +44 -0
- package/rules/java/java.correctness.read-resolve-return-type.rule.yaml +42 -0
- package/rules/java/java.correctness.readline-without-null-check.rule.yaml +45 -0
- package/rules/java/java.correctness.result-set-index-zero.rule.yaml +44 -0
- package/rules/java/java.correctness.runfinalizers-on-exit.rule.yaml +45 -0
- package/rules/java/java.correctness.runnable-run-direct.rule.yaml +45 -0
- package/rules/java/java.correctness.self-assignment.rule.yaml +45 -0
- package/rules/java/java.correctness.serializable-superclass.rule.yaml +42 -0
- package/rules/java/java.correctness.serialization-method-signature.rule.yaml +42 -0
- package/rules/java/java.correctness.servlet-mutable-fields.rule.yaml +45 -0
- package/rules/java/java.correctness.shift-out-of-range.rule.yaml +44 -0
- package/rules/java/java.correctness.static-date-field.rule.yaml +42 -0
- package/rules/java/java.correctness.stream-reuse.rule.yaml +42 -0
- package/rules/java/java.correctness.string-format-arg-mismatch.rule.yaml +45 -0
- package/rules/java/java.correctness.stringbuilder-char-ctor.rule.yaml +42 -0
- package/rules/java/java.correctness.switch-statement-labels.rule.yaml +44 -0
- package/rules/java/java.correctness.sync-boxed-primitive.rule.yaml +45 -0
- package/rules/java/java.correctness.sync-on-get-class.rule.yaml +42 -0
- package/rules/java/java.correctness.sync-on-lock-primitive.rule.yaml +45 -0
- package/rules/java/java.correctness.sync-on-mutable-ref.rule.yaml +42 -0
- package/rules/java/java.correctness.sync-on-nullable-field.rule.yaml +42 -0
- package/rules/java/java.correctness.sync-on-public-field.rule.yaml +42 -0
- package/rules/java/java.correctness.sync-on-string-literal.rule.yaml +2 -0
- package/rules/java/java.correctness.system-exit.rule.yaml +43 -0
- package/rules/java/java.correctness.thread-sleep-with-lock.rule.yaml +45 -0
- package/rules/java/java.correctness.thread-static-misuse.rule.yaml +42 -0
- package/rules/java/java.correctness.threadgroup-deprecated-methods.rule.yaml +43 -0
- package/rules/java/java.correctness.throw-null.rule.yaml +42 -0
- package/rules/java/java.correctness.timezone-invalid-id.rule.yaml +42 -0
- package/rules/java/java.correctness.two-lock-wait.rule.yaml +45 -0
- package/rules/java/java.correctness.unconditional-recursion.rule.yaml +42 -0
- package/rules/java/java.correctness.unescaped-whitespace.rule.yaml +42 -0
- package/rules/java/java.correctness.unimplementable-interface.rule.yaml +42 -0
- package/rules/java/java.correctness.unsafe-collection-downcast.rule.yaml +42 -0
- package/rules/java/java.correctness.unsafe-getresource.rule.yaml +45 -0
- package/rules/java/java.correctness.unsupported-jdk-api.rule.yaml +46 -0
- package/rules/java/java.correctness.unsupported-method-call.rule.yaml +42 -0
- package/rules/java/java.correctness.unsync-static-lazy-init.rule.yaml +42 -0
- package/rules/java/java.correctness.unsynchronized-wait-notify.rule.yaml +45 -0
- package/rules/java/java.correctness.unterminated-assertion-chain.rule.yaml +39 -0
- package/rules/java/java.correctness.volatile-array-elements.rule.yaml +45 -0
- package/rules/java/java.correctness.volatile-increment-non-atomic.rule.yaml +45 -0
- package/rules/java/java.correctness.wait-notify-on-thread.rule.yaml +45 -0
- package/rules/java/java.correctness.wait-on-condition.rule.yaml +45 -0
- package/rules/java/java.correctness.week-year-in-date-pattern.rule.yaml +44 -0
- package/rules/java/java.correctness.zoneid-invalid-timezone.rule.yaml +42 -0
- package/rules/java/java.doc.empty-javadoc-tag.rule.yaml +41 -0
- package/rules/java/java.doc.malformed-javadoc-comment.rule.yaml +41 -0
- package/rules/java/java.doc.parameter-tag-no-description.rule.yaml +41 -0
- package/rules/java/java.doc.unmatched-parameter-tag.rule.yaml +41 -0
- package/rules/java/java.performance.boxed-boolean-constructor.rule.yaml +43 -0
- package/rules/java/java.performance.boxed-double-constructor.rule.yaml +43 -0
- package/rules/java/java.performance.boxed-integer-constructor.rule.yaml +43 -0
- package/rules/java/java.performance.empty-string-constructor.rule.yaml +44 -0
- package/rules/java/java.performance.expensive-method-on-ui-thread.rule.yaml +50 -0
- package/rules/java/java.performance.explicit-gc.rule.yaml +43 -0
- package/rules/java/java.performance.inefficient-string-constructor.rule.yaml +44 -0
- package/rules/java/java.performance.keyset-instead-of-entryset.rule.yaml +49 -0
- package/rules/java/java.performance.non-zero-to-array.rule.yaml +49 -0
- package/rules/java/java.performance.pattern-compile-in-loop.rule.yaml +49 -0
- package/rules/java/java.performance.removeall-to-clear.rule.yaml +49 -0
- package/rules/java/java.performance.replaceall-instead-of-replace.rule.yaml +49 -0
- package/rules/java/java.performance.single-char-string-indexof.rule.yaml +49 -0
- package/rules/java/java.performance.string-concat-in-loop.rule.yaml +49 -0
- package/rules/java/java.performance.string-to-string.rule.yaml +43 -0
- package/rules/java/java.performance.thread-as-runnable.rule.yaml +44 -0
- package/rules/java/java.performance.url-in-collection.rule.yaml +44 -0
- package/rules/java/java.quality.c-style-array-declaration.rule.yaml +41 -0
- package/rules/java/java.quality.multiple-variables-same-line.rule.yaml +41 -0
- package/rules/java/java.quality.type-name-uppercase.rule.yaml +41 -0
- package/rules/java/java.testing.setup-teardown-annotation.rule.yaml +36 -0
- package/rules/java/java.testing.setup-without-super.rule.yaml +43 -0
- package/rules/java/java.testing.teardown-without-super.rule.yaml +43 -0
- package/rules/java/java.testing.wrong-assertion-argument-order.rule.yaml +43 -0
- package/rules/php/php.correctness.abstract-method-outside-abstract-class.rule.yaml +39 -0
- package/rules/php/php.correctness.abstract-method-with-body.rule.yaml +38 -0
- package/rules/php/php.correctness.assign-to-non-lvalue.rule.yaml +38 -0
- package/rules/php/php.correctness.attribute-on-class-constant.rule.yaml +38 -0
- package/rules/php/php.correctness.attribute-on-closure.rule.yaml +38 -0
- package/rules/php/php.correctness.attribute-on-function.rule.yaml +38 -0
- package/rules/php/php.correctness.attribute-on-property.rule.yaml +40 -0
- package/rules/php/php.correctness.break-continue-outside-loop.rule.yaml +38 -0
- package/rules/php/php.correctness.case-insensitive-define.rule.yaml +38 -0
- package/rules/php/php.correctness.class-implements-non-interface.rule.yaml +38 -0
- package/rules/php/php.correctness.default-parameter-not-last.rule.yaml +38 -0
- package/rules/php/php.correctness.deprecated-filter-constant.rule.yaml +38 -0
- package/rules/php/php.correctness.deprecated-libxml-entity-loader.rule.yaml +38 -0
- package/rules/php/php.correctness.deprecated-unset-cast.rule.yaml +38 -0
- package/rules/php/php.correctness.duplicate-array-key.rule.yaml +2 -0
- package/rules/php/php.correctness.duplicate-declaration.rule.yaml +38 -0
- package/rules/php/php.correctness.duplicate-union-type.rule.yaml +38 -0
- package/rules/php/php.correctness.echo-invalid-value.rule.yaml +38 -0
- package/rules/php/php.correctness.empty-array-literal-slot.rule.yaml +38 -0
- package/rules/php/php.correctness.empty-bracket-array-access.rule.yaml +38 -0
- package/rules/php/php.correctness.empty-code-block.rule.yaml +38 -0
- package/rules/php/php.correctness.empty-function-body.rule.yaml +38 -0
- package/rules/php/php.correctness.error-suppression-operator.rule.yaml +2 -0
- package/rules/php/php.correctness.function-comparison.rule.yaml +38 -0
- package/rules/php/php.correctness.inaccessible-property.rule.yaml +49 -0
- package/rules/php/php.correctness.incomplete-arrow-function.rule.yaml +38 -0
- package/rules/php/php.correctness.inconsistent-printf-params.rule.yaml +50 -0
- package/rules/php/php.correctness.instanceof-invalid-type.rule.yaml +40 -0
- package/rules/php/php.correctness.instantiate-abstract-class.rule.yaml +38 -0
- package/rules/php/php.correctness.interface-extends-non-interface.rule.yaml +38 -0
- package/rules/php/php.correctness.interface-implements-keyword.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-arrow-function-typehint.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-attribute-class.rule.yaml +49 -0
- package/rules/php/php.correctness.invalid-closure-return-typehint.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-constructor-promotion.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-cookie-options.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-dynamic-constant-fetch.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-extends-target.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-increment-operand.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-isset-argument.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-regex-literal.rule.yaml +36 -0
- package/rules/php/php.correctness.invalid-return-typehint.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-static-method.rule.yaml +40 -0
- package/rules/php/php.correctness.invalid-string-interpolation-type.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-type-cast.rule.yaml +38 -0
- package/rules/php/php.correctness.invalid-use-keyword.rule.yaml +48 -0
- package/rules/php/php.correctness.missing-member-visibility.rule.yaml +38 -0
- package/rules/php/php.correctness.missing-return-statement.rule.yaml +38 -0
- package/rules/php/php.correctness.named-arg-before-positional.rule.yaml +38 -0
- package/rules/php/php.correctness.nested-function-declaration.rule.yaml +38 -0
- package/rules/php/php.correctness.nested-switch.rule.yaml +38 -0
- package/rules/php/php.correctness.nullable-mixed-type.rule.yaml +38 -0
- package/rules/php/php.correctness.nullsafe-returned-by-reference.rule.yaml +3 -0
- package/rules/php/php.correctness.print-invalid-value.rule.yaml +38 -0
- package/rules/php/php.correctness.psr-class-constant-naming.rule.yaml +38 -0
- package/rules/php/php.correctness.psr-method-camel-case.rule.yaml +38 -0
- package/rules/php/php.correctness.redundant-final-method.rule.yaml +38 -0
- package/rules/php/php.correctness.redundant-string-cast-concat.rule.yaml +38 -0
- package/rules/php/php.correctness.self-assignment.rule.yaml +38 -0
- package/rules/php/php.correctness.switch-multiple-default.rule.yaml +2 -0
- package/rules/php/php.correctness.throw-as-expression.rule.yaml +38 -0
- package/rules/php/php.correctness.throw-non-exception.rule.yaml +38 -0
- package/rules/php/php.correctness.todo-fixme-marker.rule.yaml +36 -0
- package/rules/php/php.correctness.trait-as-attribute.rule.yaml +38 -0
- package/rules/php/php.correctness.trait-class-constant.rule.yaml +38 -0
- package/rules/php/php.correctness.undefined-constant-reference.rule.yaml +38 -0
- package/rules/php/php.correctness.undefined-function.rule.yaml +40 -0
- package/rules/php/php.correctness.undefined-method.rule.yaml +40 -0
- package/rules/php/php.correctness.undefined-property.rule.yaml +51 -0
- package/rules/php/php.correctness.undefined-static-property.rule.yaml +41 -0
- package/rules/php/php.correctness.undefined-variable.rule.yaml +48 -0
- package/rules/php/php.correctness.uninitialized-typed-property.rule.yaml +38 -0
- package/rules/php/php.correctness.unknown-magic-method.rule.yaml +38 -0
- package/rules/php/php.correctness.unreachable-after-return.rule.yaml +2 -0
- package/rules/php/php.correctness.unused-closure-use-variable.rule.yaml +38 -0
- package/rules/php/php.correctness.unused-constructor-parameter.rule.yaml +38 -0
- package/rules/php/php.correctness.unused-import.rule.yaml +38 -0
- package/rules/php/php.correctness.useless-post-increment.rule.yaml +38 -0
- package/rules/php/php.correctness.useless-unset.rule.yaml +38 -0
- package/rules/php/php.correctness.void-match-arm.rule.yaml +38 -0
- package/rules/php/php.performance.expensive-loop-condition.rule.yaml +38 -0
- package/rules/php/php.security.debug-function-exposure.rule.yaml +2 -0
- package/rules/php/php.security.insecure-session-id-generation.rule.yaml +2 -0
- package/rules/php/php.security.insecure-session-or-cookie-config.rule.yaml +3 -0
- package/rules/php/php.security.no-dynamic-eval.rule.yaml +2 -0
- package/rules/php/php.security.unsafe-include-with-user-input.rule.yaml +2 -0
- package/rules/php/php.security.unsafe-new-static.rule.yaml +44 -0
- package/rules/php/php.security.weak-cipher.rule.yaml +2 -0
- package/rules/php/php.security.xml-external-entity.rule.yaml +2 -0
- package/rules/python/py.correctness.assert-outside-test.rule.yaml +49 -0
- package/rules/python/py.correctness.global-statement.rule.yaml +51 -0
- package/rules/python/py.correctness.redefined-builtin.rule.yaml +51 -0
- package/rules/python/py.correctness.super-with-arguments.rule.yaml +51 -0
- package/rules/python/py.correctness.unnecessary-comprehension.rule.yaml +51 -0
- package/rules/python/py.correctness.useless-return.rule.yaml +51 -0
- package/rules/python/py.security.command-execution-with-request-input.rule.yaml +56 -0
- package/rules/python/py.security.ftp-usage.rule.yaml +51 -0
- package/rules/python/py.security.hardcoded-credentials.rule.yaml +51 -0
- package/rules/python/py.security.hardcoded-temp-directory.rule.yaml +51 -0
- package/rules/python/py.security.insecure-cipher-mode.rule.yaml +51 -0
- package/rules/python/py.security.insecure-cipher.rule.yaml +51 -0
- package/rules/python/py.security.insecure-crypto-import.rule.yaml +51 -0
- package/rules/python/py.security.insecure-http-transport.rule.yaml +56 -0
- package/rules/python/py.security.insecure-ssl-version.rule.yaml +53 -0
- package/rules/python/py.security.insecure-urllib-method.rule.yaml +51 -0
- package/rules/python/py.security.insecure-xml-parser.rule.yaml +53 -0
- package/rules/python/py.security.mako-insecure-templates.rule.yaml +53 -0
- package/rules/python/py.security.path-traversal-user-input.rule.yaml +51 -0
- package/rules/python/py.security.request-path-file-read.rule.yaml +56 -0
- package/rules/python/py.security.sensitive-logging.rule.yaml +51 -0
- package/rules/python/py.security.sql-interpolation.rule.yaml +56 -0
- package/rules/python/py.security.ssh-host-key-validation.rule.yaml +53 -0
- package/rules/python/py.security.telnet-usage.rule.yaml +51 -0
- package/rules/python/py.security.tls-verification-disabled.rule.yaml +56 -0
- package/rules/python/py.security.unsafe-deserialization.rule.yaml +56 -0
- package/rules/python/py.security.weak-crypto-key.rule.yaml +51 -0
- package/rules/python/py.security.weak-hash-algorithm.rule.yaml +57 -0
- package/rules/python/py.security.wildcard-subprocess-injection.rule.yaml +53 -0
- package/rules/python/py.security.xmlrpc-import.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.action-mailer-base-subclass.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.active-job-base-subclass.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.active-record-alias.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.active-record-base-subclass.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.active-record-method-override.rule.yaml +55 -0
- package/rules/ruby/ruby.bug-risk.active-support-alias.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.all-each-to-find-each.rule.yaml +55 -0
- package/rules/ruby/ruby.bug-risk.allow-blank-with-delegate.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.alter-queries-combine.rule.yaml +54 -0
- package/rules/ruby/ruby.bug-risk.ambiguous-block-association.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.ambiguous-operator-argument.rule.yaml +48 -0
- package/rules/ruby/ruby.bug-risk.ambiguous-regexp-literal.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.argument-overwritten-before-use.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.assert-not-usage.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.assignment-in-condition.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.bad-date-usage.rule.yaml +55 -0
- package/rules/ruby/ruby.bug-risk.bad-magic-comment-order.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.bad-operand-order.rule.yaml +46 -0
- package/rules/ruby/ruby.bug-risk.bad-rescue-ordering.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.branches-without-body.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.callback-order.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.callback-override.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.circular-argument-reference.rule.yaml +44 -0
- package/rules/ruby/ruby.bug-risk.class-name-should-be-string.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.console-output-instead-of-logger.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.constant-in-block.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.controller-base-subclass.rule.yaml +54 -0
- package/rules/ruby/ruby.bug-risk.dependent-option-cascade.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.deprecated-belongs-to-required.rule.yaml +54 -0
- package/rules/ruby/ruby.bug-risk.deprecated-big-decimal-new.rule.yaml +44 -0
- package/rules/ruby/ruby.bug-risk.deprecated-class-methods.rule.yaml +45 -0
- package/rules/ruby/ruby.bug-risk.deprecated-filter-methods.rule.yaml +54 -0
- package/rules/ruby/ruby.bug-risk.deprecated-find-by-dynamic.rule.yaml +55 -0
- package/rules/ruby/ruby.bug-risk.deprecated-http-status-symbols.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.deprecated-openssl-api.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.deprecated-uri-escape.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.deprecated-uri-regexp.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.disjunctive-assignment-in-constructor.rule.yaml +46 -0
- package/rules/ruby/ruby.bug-risk.division-by-zero.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.duplicate-case-conditions.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.duplicate-constant-assignment.rule.yaml +47 -0
- package/rules/ruby/ruby.bug-risk.duplicate-elsif-block.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.duplicate-hash-keys.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.duplicate-method-definitions.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.each-with-object-immutable-arg.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.else-followed-by-expression.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.else-without-rescue.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.empty-ensure-block.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.empty-expression.rule.yaml +48 -0
- package/rules/ruby/ruby.bug-risk.empty-interpolation.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.end-in-method.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.enum-array-syntax.rule.yaml +54 -0
- package/rules/ruby/ruby.bug-risk.enum-duplicate-values.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.equal-instead-of-equal.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.error-inherits-exception.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.exception-class-overwritten.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.exit-in-app-code.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.flip-flop-operator.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.git-in-gemspec.rule.yaml +48 -0
- package/rules/ruby/ruby.bug-risk.grouped-parentheses-in-call.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.has-and-belongs-to-many.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.helper-instance-variables.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.heredoc-method-order.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.http-methods-without-params.rule.yaml +54 -0
- package/rules/ruby/ruby.bug-risk.identical-binary-operands.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.ignored-column-accessed.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.inconsistent-request-referrer.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.inconsistent-safe-navigation-try.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.inconsistent-safe-navigation.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.incorrect-pluralization.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.ineffective-access-modifier.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.interpolation-in-single-quote.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.invalid-integer-times.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.invalid-percent-string-literal.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.invalid-percent-symbol-array.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.invalid-rails-env-predicate.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.invalid-rescue-type.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.io-select-single-arg.rule.yaml +48 -0
- package/rules/ruby/ruby.bug-risk.irreversible-migration.rule.yaml +57 -0
- package/rules/ruby/ruby.bug-risk.missing-inverse-of.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.mixed-regex-captures.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.multiple-rescues-for-same-exception.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.non-local-exit-from-iterator.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.non-null-column-without-default.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.non-preferred-assert-falseness.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.old-style-validation-macro.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.outer-variable-shadowed.rule.yaml +47 -0
- package/rules/ruby/ruby.bug-risk.plain-method-instead-of-proc.rule.yaml +48 -0
- package/rules/ruby/ruby.bug-risk.predicate-method-without-parentheses.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.rails-env-equality.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.rails-root-join.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.rake-task-missing-environment.rule.yaml +46 -0
- package/rules/ruby/ruby.bug-risk.raw-sql-without-squish.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.redundant-allow-nil.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.redundant-foreign-key.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.redundant-with-options-receiver.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.regex-literal-in-condition.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.relative-date-as-constant.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.renamed-column-accessed.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.rescue-exception.rule.yaml +42 -0
- package/rules/ruby/ruby.bug-risk.return-in-ensure.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.routes-match-single-verb.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.safe-navigation-with-blank.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.safe-navigation-with-empty.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.self-assignment.rule.yaml +52 -0
- package/rules/ruby/ruby.bug-risk.skip-filter-conditional.rule.yaml +55 -0
- package/rules/ruby/ruby.bug-risk.suppressed-exceptions.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.symbol-boolean-name.rule.yaml +44 -0
- package/rules/ruby/ruby.bug-risk.table-without-timestamps.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.time-without-zone.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.to-json-without-argument.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.trailing-comma-attribute.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.undefined-action-filter.rule.yaml +53 -0
- package/rules/ruby/ruby.bug-risk.unintended-string-concatenation.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.unnecessary-require.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.unnecessary-splat.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.unqualified-constant.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.unreachable-code.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.unreachable-loop.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.unsafe-number-conversion.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.unsafe-safe-navigation-chain.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.unused-method-arguments.rule.yaml +51 -0
- package/rules/ruby/ruby.bug-risk.use-blank-simplify.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.use-delegate.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.use-presence-over-explicit-check.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.use-present-to-simplify-conditional.rule.yaml +48 -0
- package/rules/ruby/ruby.bug-risk.use-square-brackets-for-attributes.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.useless-access-modifier.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.useless-comparison.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.useless-setter-call.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.when-branch-without-body.rule.yaml +49 -0
- package/rules/ruby/ruby.bug-risk.where-first-over-find-by.rule.yaml +54 -0
- package/rules/ruby/ruby.bug-risk.with-index-value-unused.rule.yaml +50 -0
- package/rules/ruby/ruby.bug-risk.with-object-value-unused.rule.yaml +50 -0
- package/rules/ruby/ruby.performance.efficient-hash-search.rule.yaml +42 -0
- package/rules/ruby/ruby.performance.enumerable-index-by.rule.yaml +51 -0
- package/rules/ruby/ruby.performance.enumerable-index-with.rule.yaml +52 -0
- package/rules/ruby/ruby.performance.merge-single-key.rule.yaml +42 -0
- package/rules/ruby/ruby.performance.no-static-size-computation.rule.yaml +43 -0
- package/rules/ruby/ruby.performance.prefer-delete-prefix.rule.yaml +53 -0
- package/rules/ruby/ruby.performance.prefer-delete-suffix.rule.yaml +53 -0
- package/rules/ruby/ruby.performance.prefer-flat-map.rule.yaml +41 -0
- package/rules/ruby/ruby.performance.prefer-struct-over-openstruct.rule.yaml +42 -0
- package/rules/ruby/ruby.performance.range-cover-over-include.rule.yaml +43 -0
- package/rules/ruby/ruby.performance.regex-match-over-match.rule.yaml +42 -0
- package/rules/ruby/ruby.performance.yield-over-block-call.rule.yaml +41 -0
- package/rules/ruby/ruby.security.debugger-call.rule.yaml +53 -0
- package/rules/ruby/ruby.security.dynamic-code-execution.rule.yaml +54 -0
- package/rules/ruby/ruby.security.insecure-json-load.rule.yaml +53 -0
- package/rules/ruby/ruby.security.io-shell-command.rule.yaml +50 -0
- package/rules/ruby/ruby.security.kernel-open.rule.yaml +53 -0
- package/rules/ruby/ruby.security.plaintext-password-in-callback.rule.yaml +46 -0
- package/rules/ruby/ruby.security.rails-http-digest-auth.rule.yaml +51 -0
- package/rules/ruby/ruby.security.rails-link-to-blank-without-noopener.rule.yaml +48 -0
- package/rules/ruby/ruby.security.rails-output-unsafe.rule.yaml +47 -0
- package/rules/ruby/ruby.security.rails-render-inline.rule.yaml +55 -0
- package/rules/ruby/ruby.security.rails-skip-validation.rule.yaml +51 -0
- package/rules/rust/rust.correctness.empty-range-expression.rule.yaml +49 -0
- package/rules/rust/rust.correctness.erasing-operation.rule.yaml +49 -0
- package/rules/rust/rust.correctness.forget-drop-on-copy-type.rule.yaml +50 -0
- package/rules/rust/rust.correctness.forget-drop-on-non-drop-type.rule.yaml +50 -0
- package/rules/rust/rust.correctness.forget-drop-on-reference.rule.yaml +49 -0
- package/rules/rust/rust.correctness.hash-unit-value.rule.yaml +49 -0
- package/rules/rust/rust.correctness.identical-binary-operands.rule.yaml +49 -0
- package/rules/rust/rust.correctness.ignored-future-value.rule.yaml +53 -0
- package/rules/rust/rust.correctness.invalid-regex-literal.rule.yaml +49 -0
- package/rules/rust/rust.correctness.iter-next-in-for-loop.rule.yaml +49 -0
- package/rules/rust/rust.correctness.mistyped-suffix.rule.yaml +50 -0
- package/rules/rust/rust.correctness.nan-comparison.rule.yaml +49 -0
- package/rules/rust/rust.correctness.non-binding-let-on-lock.rule.yaml +50 -0
- package/rules/rust/rust.correctness.non-octal-permissions.rule.yaml +60 -0
- package/rules/rust/rust.correctness.print-in-display-impl.rule.yaml +48 -0
- package/rules/rust/rust.correctness.self-not-self-type.rule.yaml +49 -0
- package/rules/rust/rust.correctness.step-by-zero.rule.yaml +48 -0
- package/rules/rust/rust.correctness.syntax-error.rule.yaml +49 -0
- package/rules/rust/rust.correctness.transmute-float-char-to-ref-or-ptr.rule.yaml +48 -0
- package/rules/rust/rust.correctness.transmute-int-lit-to-raw-ptr.rule.yaml +48 -0
- package/rules/rust/rust.correctness.transmute-int-to-fn-ptr.rule.yaml +48 -0
- package/rules/rust/rust.correctness.transmute-integer-to-bool.rule.yaml +49 -0
- package/rules/rust/rust.correctness.transmute-integer-to-char.rule.yaml +48 -0
- package/rules/rust/rust.correctness.transmute-integer-to-nonzero.rule.yaml +48 -0
- package/rules/rust/rust.correctness.transmute-number-to-slice-or-array.rule.yaml +48 -0
- package/rules/rust/rust.correctness.transmute-ptr-to-ptr.rule.yaml +49 -0
- package/rules/rust/rust.correctness.transmute-ptr-to-ref.rule.yaml +49 -0
- package/rules/rust/rust.correctness.transmute-ref-to-ptr.rule.yaml +49 -0
- package/rules/rust/rust.correctness.transmute-t-to-ptr-ref.rule.yaml +49 -0
- package/rules/rust/rust.correctness.transmute-tuple-to-slice-or-array.rule.yaml +48 -0
- package/rules/rust/rust.correctness.unhandled-io-result.rule.yaml +49 -0
- package/rules/rust/rust.correctness.unit-argument.rule.yaml +50 -0
- package/rules/rust/rust.correctness.unit-comparison.rule.yaml +49 -0
- package/rules/rust/rust.performance.single-char-string-literal-pattern.rule.yaml +51 -0
- package/rules/rust/rust.quality.approximate-floating-constant.rule.yaml +51 -0
- package/rules/rust/rust.quality.builtin-type-shadow.rule.yaml +49 -0
- package/rules/rust/rust.quality.clone-on-double-reference.rule.yaml +50 -0
- package/rules/rust/rust.quality.crate-in-macro-definition.rule.yaml +50 -0
- package/rules/rust/rust.quality.deprecated-function-use.rule.yaml +52 -0
- package/rules/rust/rust.quality.env-string-literal.rule.yaml +50 -0
- package/rules/rust/rust.quality.explicit-self-assignment.rule.yaml +49 -0
- package/rules/rust/rust.quality.fn-ptr-null-comparison.rule.yaml +49 -0
- package/rules/rust/rust.quality.fn-ptr-to-non-pointer-cast.rule.yaml +50 -0
- package/rules/rust/rust.quality.inaccurate-duration-calculation.rule.yaml +50 -0
- package/rules/rust/rust.quality.isize-usize-overflow.rule.yaml +50 -0
- package/rules/rust/rust.quality.iter-count-instead-of-len.rule.yaml +49 -0
- package/rules/rust/rust.quality.iter-nth-instead-of-get.rule.yaml +50 -0
- package/rules/rust/rust.quality.map-followed-by-count.rule.yaml +50 -0
- package/rules/rust/rust.quality.non-owned-rc-pointer-into-vec.rule.yaml +50 -0
- package/rules/rust/rust.quality.non-utf8-literal-in-from-utf8-unchecked.rule.yaml +54 -0
- package/rules/rust/rust.quality.option-env-unwrap.rule.yaml +50 -0
- package/rules/rust/rust.quality.ordered-iteration-on-unordered.rule.yaml +52 -0
- package/rules/rust/rust.quality.possible-missing-comma-in-array.rule.yaml +49 -0
- package/rules/rust/rust.quality.potentially-incomplete-ascii-range.rule.yaml +49 -0
- package/rules/rust/rust.quality.redundant-mem-replace-with-default.rule.yaml +48 -0
- package/rules/rust/rust.quality.redundant-mem-replace-with-none.rule.yaml +48 -0
- package/rules/rust/rust.quality.redundant-mem-replace-with-zero.rule.yaml +48 -0
- package/rules/rust/rust.quality.replace-same-pattern-and-replacement.rule.yaml +49 -0
- package/rules/rust/rust.quality.size-of-val-on-reference.rule.yaml +49 -0
- package/rules/rust/rust.quality.unused-enumerate-or-zip-items.rule.yaml +50 -0
- package/rules/rust/rust.security.actix-namedfile-path-traversal.rule.yaml +61 -0
- package/rules/rust/rust.security.bind-all-interfaces.rule.yaml +2 -0
- package/rules/rust/rust.security.const-to-mut-ptr.rule.yaml +61 -0
- package/rules/rust/rust.security.differently-sized-slice-conversion.rule.yaml +61 -0
- package/rules/rust/rust.security.global-write-permission.rule.yaml +61 -0
- package/rules/rust/rust.security.insecure-temp-file.rule.yaml +2 -0
- package/rules/rust/rust.security.invisible-unicode.rule.yaml +60 -0
- package/rules/rust/rust.security.manual-error-type-id.rule.yaml +59 -0
- package/rules/rust/rust.security.missing-regex-anchor.rule.yaml +61 -0
- package/rules/rust/rust.security.misused-bitwise-xor.rule.yaml +54 -0
- package/rules/rust/rust.security.open-redirect.rule.yaml +64 -0
- package/rules/rust/rust.security.potentially-vulnerable-regex.rule.yaml +61 -0
- package/rules/rust/rust.security.raw-slice-to-ptr.rule.yaml +60 -0
- package/rules/rust/rust.security.unsafe-remove-dir-all.rule.yaml +62 -0
- package/rules/rust/rust.security.weak-crypto-import.rule.yaml +2 -0
- package/rules/rust/rust.security.weak-rsa-key-size.rule.yaml +2 -0
- package/rules/rust/rust.testing.ignore-without-ticket-reference.rule.yaml +13 -7
- package/rules/rust/rust.testing.thread-sleep-in-unit-test.rule.yaml +6 -6
- package/rules/shared/security.no-command-execution-with-request-input.rule.yaml +3 -0
- package/rules/shared/security.no-sensitive-data-in-logs-and-telemetry.rule.yaml +2 -0
- package/rules/shared/security.no-sql-interpolation.rule.yaml +2 -0
- package/rules/shared/security.permissive-file-permissions.rule.yaml +2 -0
- package/rules/shared/security.weak-hash-algorithm.rule.yaml +2 -0
- package/rules/sql/sql.correctness.undefined-reference.rule.yaml +37 -0
- package/rules/sql/sql.style.ambiguous-distinct.rule.yaml +37 -0
- package/rules/sql/sql.style.column-expression-without-alias.rule.yaml +37 -0
- package/rules/sql/sql.style.distinct-with-parenthesis.rule.yaml +37 -0
- package/rules/sql/sql.style.duplicate-table-aliases.rule.yaml +37 -0
- package/rules/sql/sql.style.implicit-column-alias.rule.yaml +37 -0
- package/rules/sql/sql.style.implicit-table-alias.rule.yaml +37 -0
- package/rules/sql/sql.style.inconsistent-capitalization.rule.yaml +37 -0
- package/rules/sql/sql.style.inconsistent-keyword-case.rule.yaml +37 -0
- package/rules/sql/sql.style.keyword-as-identifier.rule.yaml +37 -0
- package/rules/sql/sql.style.trailing-select-comma.rule.yaml +37 -0
- package/rules/sql/sql.style.unqualified-references.rule.yaml +37 -0
- package/rules/sql/sql.style.unused-table-alias.rule.yaml +37 -0
- package/rules/typescript/ts.angularjs.inject-function-assignments-only.rule.yaml +36 -0
- package/rules/typescript/ts.angularjs.no-controller.rule.yaml +36 -0
- package/rules/typescript/ts.angularjs.no-deprecated-cookie-store.rule.yaml +36 -0
- package/rules/typescript/ts.angularjs.no-deprecated-directive-replace.rule.yaml +36 -0
- package/rules/typescript/ts.angularjs.no-deprecated-http-success-error.rule.yaml +36 -0
- package/rules/typescript/ts.angularjs.no-jquery-wrapping-angular-element.rule.yaml +36 -0
- package/rules/typescript/ts.angularjs.prefer-angular-for-each.rule.yaml +36 -0
- package/rules/typescript/ts.angularjs.prefer-angular-is-string.rule.yaml +36 -0
- package/rules/typescript/ts.correctness.array-callback-missing-return.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.array-sort-without-compare.rule.yaml +5 -3
- package/rules/typescript/ts.correctness.assignment-in-condition.rule.yaml +4 -2
- package/rules/typescript/ts.correctness.assignment-to-exports.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.assignment-to-import-binding.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.async-promise-executor.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.blocking-call-in-async-flow.rule.yaml +14 -3
- package/rules/typescript/ts.correctness.callback-missing-error-handling.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.callback-not-error-first.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.compound-assignment-with-await.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.confusing-multiline-expression.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.constructor-return-value.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.control-flow-in-finally.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.declaration-in-nested-block.rule.yaml +39 -0
- package/rules/typescript/ts.correctness.delete-on-variable.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.deprecated-api-usage.rule.yaml +39 -0
- package/rules/typescript/ts.correctness.duplicate-class-member.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.duplicate-export.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.duplicate-function-parameter.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.duplicate-if-else-condition.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.duplicate-import-source.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.duplicate-object-key.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.duplicate-switch-case.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.empty-block-statement.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.empty-destructuring-pattern.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.extraneous-import.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.flawed-string-comparison.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.global-object-called-as-function.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.identical-comparison-operands.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.implicit-undefined-return.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.infinite-loop.rule.yaml +16 -7
- package/rules/typescript/ts.correctness.invalid-async-await-call.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.invalid-shebang.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.invalid-typeof-comparison.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.invalid-variable-usage.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.missing-async-on-promise-method.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.missing-super-call.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.missing-timeout-on-external-call.rule.yaml +13 -6
- package/rules/typescript/ts.correctness.missing-type-annotation.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.namespace-import-unexported-name.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.negative-zero-comparison.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.new-expression-with-require.rule.yaml +39 -0
- package/rules/typescript/ts.correctness.new-symbol-instance.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.no-confusing-label-in-switch.rule.yaml +39 -0
- package/rules/typescript/ts.correctness.no-href-with-nuxt-link.rule.yaml +39 -0
- package/rules/typescript/ts.correctness.no-ts-suppress-directive.rule.yaml +36 -0
- package/rules/typescript/ts.correctness.non-existent-assignment-operators.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.off-by-one-loop-boundary.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.parse-int-on-number-literal.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.prefer-as-const-over-literal-type.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.prefer-includes-over-indexof.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.prefer-nullish-coalescing.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.private-member-should-be-readonly.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.promise-reject-non-error.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.prototype-builtin-called-directly.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.reassign-catch-binding.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.reassign-class-member.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.reassign-const-binding.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.reassign-function-declaration.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.regexp-constructor-invalid-pattern.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.regexp-empty-character-class.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.regexp-multicodepoint-character-class.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.regexp-pattern-unusual-control-character.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.regexp-useless-backreference.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.require-outside-import.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.restricted-global-variable.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.restricted-object-property.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.self-assignment.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.setter-return-value.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.simplify-boolean-return.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.sparse-array-literal.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.switch-case-fallthrough.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.template-placeholder-in-string.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.this-before-super.rule.yaml +3 -0
- package/rules/typescript/ts.correctness.this-outside-class.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.undeclared-variable.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.unhandled-async-error.rule.yaml +7 -1
- package/rules/typescript/ts.correctness.unnecessary-return-await.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.unresolved-import.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.unsafe-negation-in-relational.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.unused-expression.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.unused-variable.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.use-number-is-nan.rule.yaml +2 -0
- package/rules/typescript/ts.correctness.used-before-definition.rule.yaml +38 -0
- package/rules/typescript/ts.correctness.var-declaration.rule.yaml +38 -0
- package/rules/typescript/ts.next.no-document-import-outside-custom-document.rule.yaml +39 -0
- package/rules/typescript/ts.next.no-head-import-in-custom-document.rule.yaml +39 -0
- package/rules/typescript/ts.performance.no-await-in-loop.rule.yaml +6 -6
- package/rules/typescript/ts.performance.no-json-parse-stringify-clone.rule.yaml +8 -0
- package/rules/typescript/ts.performance.sequential-async-calls.rule.yaml +16 -7
- package/rules/typescript/ts.quality.no-banned-type.rule.yaml +36 -0
- package/rules/typescript/ts.quality.no-empty-function.rule.yaml +1 -1
- package/rules/typescript/ts.quality.no-side-effect-in-pure-callback.rule.yaml +36 -0
- package/rules/typescript/ts.quality.swallowed-error.rule.yaml +6 -3
- package/rules/typescript/ts.react.no-deprecated-is-mounted.rule.yaml +36 -0
- package/rules/typescript/ts.react.no-deprecated-react-dom-root-api.rule.yaml +24 -2
- package/rules/typescript/ts.react.no-direct-state-mutation.rule.yaml +2 -0
- package/rules/typescript/ts.react.no-duplicate-jsx-attributes.rule.yaml +2 -0
- package/rules/typescript/ts.react.no-hooks-rule-violation.rule.yaml +38 -0
- package/rules/typescript/ts.react.no-invalid-markup-characters.rule.yaml +36 -0
- package/rules/typescript/ts.react.no-lifecycle-method-typo.rule.yaml +36 -0
- package/rules/typescript/ts.react.no-render-invalid-return-type.rule.yaml +36 -0
- package/rules/typescript/ts.react.no-set-state-in-component-did-mount.rule.yaml +2 -0
- package/rules/typescript/ts.react.no-set-state-in-component-did-update.rule.yaml +2 -0
- package/rules/typescript/ts.react.no-set-state-in-component-will-update.rule.yaml +36 -0
- package/rules/typescript/ts.react.no-should-component-update.rule.yaml +36 -0
- package/rules/typescript/ts.react.no-target-blank-without-rel.rule.yaml +2 -0
- package/rules/typescript/ts.react.no-this-state-in-set-state.rule.yaml +38 -0
- package/rules/typescript/ts.react.no-unnecessary-fragment.rule.yaml +36 -0
- package/rules/typescript/ts.runtime.no-process-exit.rule.yaml +3 -0
- package/rules/typescript/ts.runtime.process-exit-control-flow.rule.yaml +46 -0
- package/rules/typescript/ts.security.dangerous-insert-html.rule.yaml +5 -0
- package/rules/typescript/ts.security.express-insecure-listen.rule.yaml +52 -0
- package/rules/typescript/ts.security.express-nosql-injection.rule.yaml +16 -11
- package/rules/typescript/ts.security.express-static-dotfiles-allow.rule.yaml +5 -0
- package/rules/typescript/ts.security.iframe-missing-sandbox-attribute.rule.yaml +18 -6
- package/rules/typescript/ts.security.import-using-user-input.rule.yaml +62 -10
- package/rules/typescript/ts.security.insecure-auth-cookie-flags.rule.yaml +12 -4
- package/rules/typescript/ts.security.missing-request-timeout-or-retry.rule.yaml +8 -6
- package/rules/typescript/ts.security.no-assign-mutable-export.rule.yaml +2 -0
- package/rules/typescript/ts.security.no-dynamic-execution.rule.yaml +3 -3
- package/rules/typescript/ts.security.no-javascript-url.rule.yaml +42 -8
- package/rules/typescript/ts.security.no-native-prototype-extension.rule.yaml +13 -1
- package/rules/typescript/ts.security.non-literal-fs-filename.rule.yaml +13 -1
- package/rules/typescript/ts.security.observable-timing-discrepancy.rule.yaml +3 -3
- package/rules/typescript/ts.security.open-redirect.rule.yaml +6 -0
- package/rules/typescript/ts.security.path-join-user-input.rule.yaml +50 -0
- package/rules/typescript/ts.security.sensitive-data-written-to-file.rule.yaml +16 -6
- package/rules/typescript/ts.security.ssrf.rule.yaml +1 -0
- package/rules/typescript/ts.security.unsafe-dirname-path-concat.rule.yaml +3 -0
- package/rules/typescript/ts.security.unsanitized-http-response.rule.yaml +14 -3
- package/rules/typescript/ts.security.user-controlled-regexp.rule.yaml +52 -0
- package/rules/typescript/ts.testing.no-flaky-timer-test.rule.yaml +7 -7
- package/rules/typescript/ts.testing.no-legacy-test-waiter.rule.yaml +36 -0
- package/rules/typescript/ts.testing.no-network-call-in-unit-test.rule.yaml +7 -1
- package/rules/typescript/ts.testing.no-skipped-test-without-ticket.rule.yaml +3 -3
- package/rules/typescript/ts.testing.useless-assertion.rule.yaml +37 -0
- package/rules/typescript/ts.vue.emits-validator-return-boolean.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-browser-globals-in-created.rule.yaml +39 -0
- package/rules/typescript/ts.vue.no-computed-missing-dependency.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-computed-mutation.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-data-object-declaration.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-deprecated-keycodes-config.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-deprecated-listeners.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-deprecated-model-option.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-deprecated-scoped-slots.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-keycode-modifiers.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-reserved-key-overwrite.rule.yaml +36 -0
- package/rules/typescript/ts.vue.no-server-env-in-client-hooks.rule.yaml +39 -0
- package/rules/typescript/ts.vue.no-slot-property-access.rule.yaml +36 -0
- package/rules/typescript/ts.vue.prefer-prop-type-constructor.rule.yaml +36 -0
- package/rules/typescript/ts.vue.require-transition-conditional.rule.yaml +36 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: go.performance.utf8-decode-rune
|
|
5
|
+
title: Use `utf8.DecodeRuneInString` instead of `[]rune(string)[0]`
|
|
6
|
+
summary: The `[]rune(str)[0]` pattern allocates a rune slice. Use `utf8.DecodeRuneInString(str)` for single-rune access.
|
|
7
|
+
rationale: >-
|
|
8
|
+
Converting a string to `[]rune` allocates a new slice. For single-rune access,
|
|
9
|
+
`utf8.DecodeRuneInString` avoids the allocation entirely.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-P4006
|
|
12
|
+
tags:
|
|
13
|
+
- performance
|
|
14
|
+
- go
|
|
15
|
+
- rules-catalog
|
|
16
|
+
stability: experimental
|
|
17
|
+
appliesTo: block
|
|
18
|
+
scope:
|
|
19
|
+
languages:
|
|
20
|
+
- go
|
|
21
|
+
paths:
|
|
22
|
+
include:
|
|
23
|
+
- "**/*.go"
|
|
24
|
+
exclude:
|
|
25
|
+
- "**/*_test.go"
|
|
26
|
+
- "**/testdata/**"
|
|
27
|
+
- "**/vendor/**"
|
|
28
|
+
match:
|
|
29
|
+
fact:
|
|
30
|
+
kind: go.performance.utf8-decode-rune
|
|
31
|
+
bind: issue
|
|
32
|
+
emit:
|
|
33
|
+
finding:
|
|
34
|
+
category: performance.optimization
|
|
35
|
+
severity: high
|
|
36
|
+
confidence: 0.9
|
|
37
|
+
tags:
|
|
38
|
+
- performance
|
|
39
|
+
- go
|
|
40
|
+
message:
|
|
41
|
+
title: Use `utf8.DecodeRuneInString` instead of `[]rune(string)[0]`
|
|
42
|
+
summary: "Replace `${captures.issue.text}` with `utf8.DecodeRuneInString(str)` to avoid rune slice allocation."
|
|
43
|
+
remediation:
|
|
44
|
+
summary: "Replace `[]rune(str)[0]` with `r, _ := utf8.DecodeRuneInString(str)`."
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: go.security.decompression-bomb
|
|
5
|
+
title: Guard against decompression bomb denial-of-service
|
|
6
|
+
summary: >-
|
|
7
|
+
`io.Copy` or `io.CopyBuffer` with an uncompressed reader from a decompressor (`gzip.NewReader`, `zlib.NewReader`, etc.) without a size limit can exhaust memory or disk in a decompression bomb attack.
|
|
8
|
+
rationale: >-
|
|
9
|
+
An attacker can send a small compressed payload that decompresses to many times its original size, causing denial-of-service via memory exhaustion or disk filling. Use `io.CopyN` or `io.LimitReader` to cap the decompressed output.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S2110
|
|
12
|
+
detection:
|
|
13
|
+
kind: pattern
|
|
14
|
+
references:
|
|
15
|
+
- kind: cwe
|
|
16
|
+
id: CWE-409
|
|
17
|
+
title: Improper Handling of Highly Compressed Data (Data Amplification)
|
|
18
|
+
- kind: owasp
|
|
19
|
+
title: Denial of Service Cheat Sheet
|
|
20
|
+
url: https://cheatsheetseries.owasp.org/cheatsheets/Denial_of_Service_Cheat_Sheet.html
|
|
21
|
+
tags:
|
|
22
|
+
- security
|
|
23
|
+
- go
|
|
24
|
+
- denial-of-service
|
|
25
|
+
- rules-catalog
|
|
26
|
+
stability: experimental
|
|
27
|
+
appliesTo: block
|
|
28
|
+
scope:
|
|
29
|
+
languages:
|
|
30
|
+
- go
|
|
31
|
+
paths:
|
|
32
|
+
include:
|
|
33
|
+
- "**/*.go"
|
|
34
|
+
exclude:
|
|
35
|
+
- "**/*_test.go"
|
|
36
|
+
- "**/testdata/**"
|
|
37
|
+
- "**/vendor/**"
|
|
38
|
+
match:
|
|
39
|
+
fact:
|
|
40
|
+
kind: go.security.decompression-bomb
|
|
41
|
+
bind: issue
|
|
42
|
+
emit:
|
|
43
|
+
finding:
|
|
44
|
+
category: security.denial-of-service
|
|
45
|
+
severity: critical
|
|
46
|
+
confidence: 0.65
|
|
47
|
+
tags:
|
|
48
|
+
- security
|
|
49
|
+
- go
|
|
50
|
+
message:
|
|
51
|
+
title: Limit decompressed output size near `${captures.issue.text}`
|
|
52
|
+
summary: "`${captures.issue.text}` copies decompressor output without a size limit, risking decompression bomb exhaustion."
|
|
53
|
+
remediation:
|
|
54
|
+
summary: >-
|
|
55
|
+
Replace `io.Copy` with `io.CopyN` or wrap the decompressor reader with `io.LimitReader` to cap decompressed output to an acceptable maximum (e.g., 100MB).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: go.security.http-dir-path-traversal
|
|
5
|
+
title: Avoid exposing the root filesystem via http.Dir
|
|
6
|
+
summary: >-
|
|
7
|
+
`http.Dir("/")` or `http.Dir("\\")` used with `http.FileServer` or `http.StripPrefix` exposes the entire filesystem, enabling directory traversal.
|
|
8
|
+
rationale: >-
|
|
9
|
+
Serving files from the root directory allows callers to read arbitrary files on the server, including configuration, secrets, and system files. Always restrict file serving to a specific subdirectory using relative paths.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S2111
|
|
12
|
+
detection:
|
|
13
|
+
kind: pattern
|
|
14
|
+
references:
|
|
15
|
+
- kind: cwe
|
|
16
|
+
id: CWE-22
|
|
17
|
+
title: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal)
|
|
18
|
+
- kind: owasp
|
|
19
|
+
title: Path Traversal
|
|
20
|
+
url: https://owasp.org/www-community/attacks/Path_Traversal
|
|
21
|
+
tags:
|
|
22
|
+
- security
|
|
23
|
+
- go
|
|
24
|
+
- path-traversal
|
|
25
|
+
- rules-catalog
|
|
26
|
+
stability: experimental
|
|
27
|
+
appliesTo: block
|
|
28
|
+
scope:
|
|
29
|
+
languages:
|
|
30
|
+
- go
|
|
31
|
+
paths:
|
|
32
|
+
include:
|
|
33
|
+
- "**/*.go"
|
|
34
|
+
exclude:
|
|
35
|
+
- "**/*_test.go"
|
|
36
|
+
- "**/testdata/**"
|
|
37
|
+
- "**/vendor/**"
|
|
38
|
+
match:
|
|
39
|
+
fact:
|
|
40
|
+
kind: go.security.http-dir-path-traversal
|
|
41
|
+
bind: issue
|
|
42
|
+
emit:
|
|
43
|
+
finding:
|
|
44
|
+
category: security.path-traversal
|
|
45
|
+
severity: high
|
|
46
|
+
confidence: 0.82
|
|
47
|
+
tags:
|
|
48
|
+
- security
|
|
49
|
+
- go
|
|
50
|
+
message:
|
|
51
|
+
title: Restrict http.Dir to a subdirectory near `${captures.issue.text}`
|
|
52
|
+
summary: "`${captures.issue.text}` serves files from the filesystem root, enabling directory traversal."
|
|
53
|
+
remediation:
|
|
54
|
+
summary: >-
|
|
55
|
+
Replace `http.Dir("/")` with a relative path such as `http.Dir("./public")` and validate that the directory contains only intended content.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: go.security.incomplete-hostname-regex
|
|
5
|
+
title: Use a complete and anchored regular expression for hostname validation
|
|
6
|
+
summary: >-
|
|
7
|
+
Regex patterns used for hostname validation should use start (`^`) and end
|
|
8
|
+
(`$`) anchors, escape literal dots, and avoid overly permissive character
|
|
9
|
+
classes that allow subdomains or non-hostname input through.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Unanchored or unescaped hostname regexes accept malicious or malformed
|
|
12
|
+
input (e.g. `evil.com.evildomain.com`), enabling SSRF, open redirects,
|
|
13
|
+
and domain validation bypasses.
|
|
14
|
+
aliases:
|
|
15
|
+
- GO-S1016
|
|
16
|
+
detection:
|
|
17
|
+
kind: pattern
|
|
18
|
+
references:
|
|
19
|
+
- kind: cwe
|
|
20
|
+
id: CWE-185
|
|
21
|
+
title: Incorrect Regular Expression
|
|
22
|
+
- kind: owasp
|
|
23
|
+
title: Input Validation Cheat Sheet
|
|
24
|
+
url: https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html
|
|
25
|
+
tags:
|
|
26
|
+
- security
|
|
27
|
+
- go
|
|
28
|
+
- regex
|
|
29
|
+
- hostname
|
|
30
|
+
- validation
|
|
31
|
+
- rules-catalog
|
|
32
|
+
stability: experimental
|
|
33
|
+
appliesTo: block
|
|
34
|
+
scope:
|
|
35
|
+
languages:
|
|
36
|
+
- go
|
|
37
|
+
paths:
|
|
38
|
+
include:
|
|
39
|
+
- "**/*.go"
|
|
40
|
+
exclude:
|
|
41
|
+
- "**/*_test.go"
|
|
42
|
+
- "**/testdata/**"
|
|
43
|
+
- "**/vendor/**"
|
|
44
|
+
match:
|
|
45
|
+
fact:
|
|
46
|
+
kind: go.security.incomplete-hostname-regex
|
|
47
|
+
bind: issue
|
|
48
|
+
emit:
|
|
49
|
+
finding:
|
|
50
|
+
category: security.validation
|
|
51
|
+
severity: medium
|
|
52
|
+
confidence: 0.55
|
|
53
|
+
tags:
|
|
54
|
+
- security
|
|
55
|
+
- go
|
|
56
|
+
- regex
|
|
57
|
+
message:
|
|
58
|
+
title: Anchor hostname regex at start and end in `${captures.issue.text}`
|
|
59
|
+
summary: "`${captures.issue.text}` uses a regex that may accept broader input than intended for hostname validation."
|
|
60
|
+
remediation:
|
|
61
|
+
summary: >-
|
|
62
|
+
Anchor the pattern with `^` and `$`, escape literal dots with `\\.`, and
|
|
63
|
+
restrict character classes to valid hostname characters. For example:
|
|
64
|
+
`^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*$`.
|
|
@@ -7,6 +7,8 @@ metadata:
|
|
|
7
7
|
`tls.VersionSSL30`, SSLv2, or SSLv3 string literals indicate use of broken legacy protocols.
|
|
8
8
|
rationale: >-
|
|
9
9
|
SSLv2 and SSLv3 contain unrecoverable cryptographic weaknesses (POODLE, DROWN) and must not be negotiated.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S1021
|
|
10
12
|
detection:
|
|
11
13
|
kind: pattern
|
|
12
14
|
references:
|
|
@@ -7,6 +7,8 @@ metadata:
|
|
|
7
7
|
Parsing JWTs with `jwt.Parse` and a nil keyfunc, `jwt.ParseUnverified`, or `jwt.Decode` skips signature verification and lets attackers forge tokens.
|
|
8
8
|
rationale: >-
|
|
9
9
|
Trusting unverified JWTs allows attackers to impersonate users or escalate privileges by crafting tokens with arbitrary claims.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S1019
|
|
10
12
|
detection:
|
|
11
13
|
kind: pattern
|
|
12
14
|
references:
|
|
@@ -7,6 +7,9 @@ metadata:
|
|
|
7
7
|
Public Go HTTP servers should use `http.Server` with read, write, idle, and header timeouts instead of convenience `ListenAndServe` helpers or incomplete literals.
|
|
8
8
|
rationale: >-
|
|
9
9
|
Missing timeouts enable slowloris-style resource exhaustion and hung connections on internet-facing services.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S2112
|
|
12
|
+
- GO-S2114
|
|
10
13
|
detection:
|
|
11
14
|
kind: pattern
|
|
12
15
|
references:
|
|
@@ -7,6 +7,8 @@ metadata:
|
|
|
7
7
|
Importing `net/http/pprof` or registering `/debug/pprof` handlers on the default mux exposes debugging endpoints to remote callers.
|
|
8
8
|
rationale: >-
|
|
9
9
|
Exposed pprof endpoints leak heap, goroutine, and CPU profiles and can be used for denial-of-service or sensitive data harvesting.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S2108
|
|
10
12
|
detection:
|
|
11
13
|
kind: pattern
|
|
12
14
|
references:
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: go.security.squirrel-unsafe-quoting
|
|
5
|
+
title: Use safe parameterized queries with squirrel query builder
|
|
6
|
+
summary: >-
|
|
7
|
+
`squirrel.Expr` (or `sq.Expr`) with `fmt.Sprintf` interpolation constructs
|
|
8
|
+
SQL queries via string formatting, enabling SQL injection when arguments
|
|
9
|
+
contain untrusted data.
|
|
10
|
+
rationale: >-
|
|
11
|
+
String interpolation in query construction bypasses placeholder-based
|
|
12
|
+
parameterization, allowing attackers to inject SQL through user-controlled
|
|
13
|
+
input. Use `squirrel.Eq{}`, `squirrel.Eq{}`, or other safe builders that
|
|
14
|
+
emit parameterized queries.
|
|
15
|
+
aliases:
|
|
16
|
+
- GO-S1017
|
|
17
|
+
detection:
|
|
18
|
+
kind: pattern
|
|
19
|
+
references:
|
|
20
|
+
- kind: cwe
|
|
21
|
+
id: CWE-89
|
|
22
|
+
title: SQL Injection
|
|
23
|
+
- kind: owasp
|
|
24
|
+
title: SQL Injection Prevention Cheat Sheet
|
|
25
|
+
url: https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
|
|
26
|
+
tags:
|
|
27
|
+
- security
|
|
28
|
+
- go
|
|
29
|
+
- sql-injection
|
|
30
|
+
- squirrel
|
|
31
|
+
- rules-catalog
|
|
32
|
+
stability: experimental
|
|
33
|
+
appliesTo: block
|
|
34
|
+
scope:
|
|
35
|
+
languages:
|
|
36
|
+
- go
|
|
37
|
+
paths:
|
|
38
|
+
include:
|
|
39
|
+
- "**/*.go"
|
|
40
|
+
exclude:
|
|
41
|
+
- "**/*_test.go"
|
|
42
|
+
- "**/testdata/**"
|
|
43
|
+
- "**/vendor/**"
|
|
44
|
+
match:
|
|
45
|
+
fact:
|
|
46
|
+
kind: go.security.squirrel-unsafe-quoting
|
|
47
|
+
bind: issue
|
|
48
|
+
emit:
|
|
49
|
+
finding:
|
|
50
|
+
category: security.injection
|
|
51
|
+
severity: high
|
|
52
|
+
confidence: 0.5
|
|
53
|
+
tags:
|
|
54
|
+
- security
|
|
55
|
+
- go
|
|
56
|
+
- sql-injection
|
|
57
|
+
message:
|
|
58
|
+
title: Use parameterized query instead of squirrel.Expr with string interpolation
|
|
59
|
+
summary: "`${captures.issue.text}` uses `squirrel.Expr` with `fmt.Sprintf` instead of safe builders like `squirrel.Eq{}`."
|
|
60
|
+
remediation:
|
|
61
|
+
summary: >-
|
|
62
|
+
Replace `squirrel.Expr(fmt.Sprintf(...))` with safe builders such as
|
|
63
|
+
`squirrel.Eq{"field": value}` or `squirrel.Expr("field = ?", value)`
|
|
64
|
+
with placeholder syntax.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: go.security.tainted-value-sink
|
|
5
|
+
title: Avoid using tainted values in SQL and command sinks
|
|
6
|
+
summary: >-
|
|
7
|
+
User-controlled input (parameters named `input`, `data`, `body`, etc.) should not reach SQL execution or OS command sinks via `fmt.Sprintf` string interpolation.
|
|
8
|
+
rationale: >-
|
|
9
|
+
Building SQL queries or shell commands by interpolating user input with `fmt.Sprintf` enables SQL injection and command injection attacks. Use parameterized queries or sanitized APIs instead.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S7000
|
|
12
|
+
detection:
|
|
13
|
+
kind: pattern
|
|
14
|
+
references:
|
|
15
|
+
- kind: cwe
|
|
16
|
+
id: CWE-89
|
|
17
|
+
title: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
|
|
18
|
+
- kind: cwe
|
|
19
|
+
id: CWE-78
|
|
20
|
+
title: Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
|
|
21
|
+
- kind: owasp
|
|
22
|
+
title: SQL Injection Prevention Cheat Sheet
|
|
23
|
+
url: https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
|
|
24
|
+
tags:
|
|
25
|
+
- security
|
|
26
|
+
- go
|
|
27
|
+
- injection
|
|
28
|
+
- rules-catalog
|
|
29
|
+
stability: experimental
|
|
30
|
+
appliesTo: block
|
|
31
|
+
scope:
|
|
32
|
+
languages:
|
|
33
|
+
- go
|
|
34
|
+
paths:
|
|
35
|
+
include:
|
|
36
|
+
- "**/*.go"
|
|
37
|
+
exclude:
|
|
38
|
+
- "**/*_test.go"
|
|
39
|
+
- "**/testdata/**"
|
|
40
|
+
- "**/vendor/**"
|
|
41
|
+
match:
|
|
42
|
+
fact:
|
|
43
|
+
kind: go.security.tainted-value-sink
|
|
44
|
+
bind: issue
|
|
45
|
+
emit:
|
|
46
|
+
finding:
|
|
47
|
+
category: security.injection
|
|
48
|
+
severity: high
|
|
49
|
+
confidence: 0.4
|
|
50
|
+
tags:
|
|
51
|
+
- security
|
|
52
|
+
- go
|
|
53
|
+
- experimental
|
|
54
|
+
message:
|
|
55
|
+
title: Use parameterized query instead of interpolation near `${captures.issue.text}`
|
|
56
|
+
summary: "`${captures.issue.text}` passes a potentially tainted value through `fmt.Sprintf` into a SQL or command sink."
|
|
57
|
+
remediation:
|
|
58
|
+
summary: >-
|
|
59
|
+
Replace `fmt.Sprintf` interpolation with parameterized queries (`db.ExecContext(ctx, query, args...)`) for SQL or use `exec.Command(name, arg...)` with separate arguments for OS commands.
|
|
@@ -7,6 +7,8 @@ metadata:
|
|
|
7
7
|
`tls.Config` literals should set `MinVersion` to a modern protocol (`tls.VersionTLS12` or newer) to avoid downgrade attacks.
|
|
8
8
|
rationale: >-
|
|
9
9
|
Without `MinVersion`, the Go standard library accepts legacy TLS versions that are vulnerable to known protocol attacks.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S1020
|
|
10
12
|
detection:
|
|
11
13
|
kind: pattern
|
|
12
14
|
references:
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: go.security.unsafe-defer-close
|
|
5
|
+
title: Handle deferred Close errors explicitly
|
|
6
|
+
summary: >-
|
|
7
|
+
`defer f.Close()` silently discards the error returned by `Close()`. For writable files, this can mask data loss when buffered writes fail on close.
|
|
8
|
+
rationale: >-
|
|
9
|
+
The `Close()` method on `*os.File` and other `io.Closer` implementations can return errors (e.g., flush failures, disk-full). A deferred call without error handling may silently lose data. Consider handling the close error explicitly or calling `f.Sync()` before deferring close.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S2307
|
|
12
|
+
detection:
|
|
13
|
+
kind: pattern
|
|
14
|
+
references:
|
|
15
|
+
- kind: cwe
|
|
16
|
+
id: CWE-754
|
|
17
|
+
title: Improper Check for Unusual or Exceptional Conditions
|
|
18
|
+
- kind: url
|
|
19
|
+
title: Effective Go - Defer
|
|
20
|
+
url: https://go.dev/doc/effective_go#defer
|
|
21
|
+
tags:
|
|
22
|
+
- security
|
|
23
|
+
- go
|
|
24
|
+
- error-handling
|
|
25
|
+
- rules-catalog
|
|
26
|
+
stability: experimental
|
|
27
|
+
appliesTo: block
|
|
28
|
+
scope:
|
|
29
|
+
languages:
|
|
30
|
+
- go
|
|
31
|
+
paths:
|
|
32
|
+
include:
|
|
33
|
+
- "**/*.go"
|
|
34
|
+
exclude:
|
|
35
|
+
- "**/*_test.go"
|
|
36
|
+
- "**/testdata/**"
|
|
37
|
+
- "**/vendor/**"
|
|
38
|
+
match:
|
|
39
|
+
fact:
|
|
40
|
+
kind: go.security.unsafe-defer-close
|
|
41
|
+
bind: issue
|
|
42
|
+
emit:
|
|
43
|
+
finding:
|
|
44
|
+
category: security.exceptions
|
|
45
|
+
severity: high
|
|
46
|
+
confidence: 0.55
|
|
47
|
+
tags:
|
|
48
|
+
- security
|
|
49
|
+
- go
|
|
50
|
+
message:
|
|
51
|
+
title: Handle close error instead of deferring near `${captures.issue.text}`
|
|
52
|
+
summary: "`${captures.issue.text}` defers a close call without capturing potential write errors."
|
|
53
|
+
remediation:
|
|
54
|
+
summary: >-
|
|
55
|
+
Call `f.Sync()` before the deferred `f.Close()`, or handle `f.Close()` explicitly with error checking instead of deferring it.
|
|
@@ -7,6 +7,9 @@ metadata:
|
|
|
7
7
|
Production Go code should not import `crypto/md5`, `crypto/sha1`, `crypto/des`, or `crypto/rc4` for security-sensitive purposes.
|
|
8
8
|
rationale: >-
|
|
9
9
|
MD5 and SHA-1 are broken hash functions, DES has an obsolete key size, and RC4 has known biases; using them as cryptographic primitives degrades confidentiality and integrity.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S1022
|
|
12
|
+
- GO-S1023
|
|
10
13
|
detection:
|
|
11
14
|
kind: pattern
|
|
12
15
|
references:
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: go.security.weak-file-permission
|
|
5
|
+
title: Avoid overly permissive file permissions
|
|
6
|
+
summary: >-
|
|
7
|
+
`os.WriteFile` or `os.OpenFile` with permission bits above `0600` (owner read/write) may expose sensitive data to other users on the system.
|
|
8
|
+
rationale: >-
|
|
9
|
+
Overly permissive file modes (e.g., `0744`, `0777`) allow group or world access to files that may contain credentials, tokens, or sensitive data. Restrict to `0600` or `0400` for sensitive files.
|
|
10
|
+
aliases:
|
|
11
|
+
- GO-S2306
|
|
12
|
+
detection:
|
|
13
|
+
kind: pattern
|
|
14
|
+
references:
|
|
15
|
+
- kind: cwe
|
|
16
|
+
id: CWE-276
|
|
17
|
+
title: Incorrect Default Permissions
|
|
18
|
+
- kind: owasp
|
|
19
|
+
title: File Permission Cheat Sheet
|
|
20
|
+
url: https://cheatsheetseries.owasp.org/cheatsheets/File_Permission_Cheat_Sheet.html
|
|
21
|
+
tags:
|
|
22
|
+
- security
|
|
23
|
+
- go
|
|
24
|
+
- filesystem
|
|
25
|
+
- permissions
|
|
26
|
+
- rules-catalog
|
|
27
|
+
stability: experimental
|
|
28
|
+
appliesTo: block
|
|
29
|
+
scope:
|
|
30
|
+
languages:
|
|
31
|
+
- go
|
|
32
|
+
paths:
|
|
33
|
+
include:
|
|
34
|
+
- "**/*.go"
|
|
35
|
+
exclude:
|
|
36
|
+
- "**/*_test.go"
|
|
37
|
+
- "**/testdata/**"
|
|
38
|
+
- "**/vendor/**"
|
|
39
|
+
match:
|
|
40
|
+
fact:
|
|
41
|
+
kind: go.security.weak-file-permission
|
|
42
|
+
bind: issue
|
|
43
|
+
emit:
|
|
44
|
+
finding:
|
|
45
|
+
category: security.misconfiguration
|
|
46
|
+
severity: high
|
|
47
|
+
confidence: 0.85
|
|
48
|
+
tags:
|
|
49
|
+
- security
|
|
50
|
+
- go
|
|
51
|
+
message:
|
|
52
|
+
title: Restrict file permissions near `${captures.issue.text}`
|
|
53
|
+
summary: "`${captures.issue.text}` uses permission bits above `0600` which may expose sensitive data."
|
|
54
|
+
remediation:
|
|
55
|
+
summary: >-
|
|
56
|
+
Use `0600` (owner read/write) or `0400` (owner read-only) for sensitive files. Avoid group or world access unless explicitly required and reviewed.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: java.correctness.annotation-check-always-false
|
|
5
|
+
title: Annotation retention prevents runtime check
|
|
6
|
+
summary: Checking for an annotation at runtime that is retained only at SOURCE or CLASS level will always return false.
|
|
7
|
+
rationale: The @Retention annotation controls whether an annotation is available at runtime via reflection. RetentionPolicy.SOURCE and RetentionPolicy.CLASS annotations are not preserved in the JVM, so isAnnotationPresent() will always return false. Only RetentionPolicy.RUNTIME annotations can be detected at runtime.
|
|
8
|
+
tags:
|
|
9
|
+
- correctness
|
|
10
|
+
- java
|
|
11
|
+
- rules-catalog
|
|
12
|
+
stability: experimental
|
|
13
|
+
appliesTo: block
|
|
14
|
+
aliases:
|
|
15
|
+
- JAVA-E1039
|
|
16
|
+
scope:
|
|
17
|
+
languages:
|
|
18
|
+
- java
|
|
19
|
+
paths:
|
|
20
|
+
include:
|
|
21
|
+
- "**/*.java"
|
|
22
|
+
exclude:
|
|
23
|
+
- "**/src/test/**"
|
|
24
|
+
- "**/tests/**"
|
|
25
|
+
- "**/*Test.java"
|
|
26
|
+
match:
|
|
27
|
+
fact:
|
|
28
|
+
kind: java.correctness.annotation-check-always-false
|
|
29
|
+
bind: issue
|
|
30
|
+
emit:
|
|
31
|
+
finding:
|
|
32
|
+
category: correctness.reflection
|
|
33
|
+
severity: high
|
|
34
|
+
confidence: 0.85
|
|
35
|
+
tags:
|
|
36
|
+
- correctness
|
|
37
|
+
- java
|
|
38
|
+
message:
|
|
39
|
+
title: Annotation check always returns false
|
|
40
|
+
summary: "`${captures.issue.text}` checks for an annotation with SOURCE or CLASS retention, which is never available at runtime."
|
|
41
|
+
remediation:
|
|
42
|
+
summary: Change the annotation's retention to RetentionPolicy.RUNTIME if it needs to be detected via reflection at runtime, or remove the isAnnotationPresent check.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: java.correctness.array-compared-to-non-array
|
|
5
|
+
title: Array compared to non-array value
|
|
6
|
+
summary: Comparing an array variable to a non-array value (string literal, number, boolean) is almost certainly a logic bug.
|
|
7
|
+
rationale: "Comparing an array with `==` or `.equals()` to a non-array value like a string literal or number is almost always a programmer error. Arrays are objects; comparing them to primitives or strings with `==` will always be false, and `.equals()` will never match a non-array type."
|
|
8
|
+
detection:
|
|
9
|
+
kind: pattern
|
|
10
|
+
aliases:
|
|
11
|
+
- JAVA-S0347
|
|
12
|
+
tags:
|
|
13
|
+
- correctness
|
|
14
|
+
- java
|
|
15
|
+
- equality
|
|
16
|
+
- rules-catalog
|
|
17
|
+
stability: experimental
|
|
18
|
+
appliesTo: block
|
|
19
|
+
scope:
|
|
20
|
+
languages:
|
|
21
|
+
- java
|
|
22
|
+
paths:
|
|
23
|
+
include:
|
|
24
|
+
- "**/*.java"
|
|
25
|
+
exclude:
|
|
26
|
+
- "**/src/test/**"
|
|
27
|
+
- "**/tests/**"
|
|
28
|
+
- "**/*Test.java"
|
|
29
|
+
match:
|
|
30
|
+
fact:
|
|
31
|
+
kind: java.correctness.array-compared-to-non-array
|
|
32
|
+
bind: issue
|
|
33
|
+
emit:
|
|
34
|
+
finding:
|
|
35
|
+
category: correctness.equality
|
|
36
|
+
severity: medium
|
|
37
|
+
confidence: 0.82
|
|
38
|
+
tags:
|
|
39
|
+
- correctness
|
|
40
|
+
- java
|
|
41
|
+
message:
|
|
42
|
+
title: Suspicious array comparison in `${captures.issue.text}`
|
|
43
|
+
summary: "`${captures.issue.text}` compares an array variable to a non-array value."
|
|
44
|
+
remediation:
|
|
45
|
+
summary: "Review the comparison. If checking array contents, use `Arrays.equals(array, otherArray)`. If checking length, use `array.length`."
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: java.correctness.array-index-bounds
|
|
5
|
+
title: Array or list access with out-of-bounds index
|
|
6
|
+
summary: An array, list, or string is accessed at length()/size(), which is always one past the last valid index.
|
|
7
|
+
rationale: Array indices range from 0 to length-1. Accessing index `length` throws ArrayIndexOutOfBoundsException.
|
|
8
|
+
tags:
|
|
9
|
+
- correctness
|
|
10
|
+
- java
|
|
11
|
+
- rules-catalog
|
|
12
|
+
stability: stable
|
|
13
|
+
appliesTo: block
|
|
14
|
+
aliases:
|
|
15
|
+
- JAVA-E1020
|
|
16
|
+
scope:
|
|
17
|
+
languages:
|
|
18
|
+
- java
|
|
19
|
+
paths:
|
|
20
|
+
include:
|
|
21
|
+
- "**/*.java"
|
|
22
|
+
exclude:
|
|
23
|
+
- "**/src/test/**"
|
|
24
|
+
- "**/tests/**"
|
|
25
|
+
- "**/*Test.java"
|
|
26
|
+
match:
|
|
27
|
+
fact:
|
|
28
|
+
kind: java.correctness.array-index-bounds
|
|
29
|
+
bind: issue
|
|
30
|
+
emit:
|
|
31
|
+
finding:
|
|
32
|
+
category: correctness.bounds
|
|
33
|
+
severity: critical
|
|
34
|
+
confidence: 0.9
|
|
35
|
+
tags:
|
|
36
|
+
- correctness
|
|
37
|
+
- java
|
|
38
|
+
message:
|
|
39
|
+
title: Potential index out of bounds access in `${captures.issue.text}`
|
|
40
|
+
summary: An index expression uses length()/size() as the upper bound, which is always one element past the valid range.
|
|
41
|
+
remediation:
|
|
42
|
+
summary: Use `length - 1` or `size() - 1` to access the last element, or verify the index is valid before access.
|