codesentry-semgrep-rules 0.1.8 → 0.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codesentry-semgrep-rules",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "license": "MIT",
5
5
  "description": "Snapshot local das regras OWASP do Semgrep para CodeSentry",
6
6
  "files": [
package/rules/owasp.yml CHANGED
@@ -15192,6 +15192,47 @@ rules:
15192
15192
  languages:
15193
15193
  - yaml
15194
15194
  severity: WARNING
15195
+ - id: yaml.kubernetes.security.skip-tls-verify-service.skip-tls-verify-service
15196
+ pattern: |
15197
+ spec:
15198
+ ...
15199
+ insecureSkipTLSVerify: true
15200
+ message: 'Service is disabling TLS certificate verification when communicating with
15201
+ the server. This makes your HTTPS connections insecure. Remove the ''insecureSkipTLSVerify:
15202
+ true'' key to secure communication.'
15203
+ metadata:
15204
+ cwe:
15205
+ - 'CWE-319: Cleartext Transmission of Sensitive Information'
15206
+ references:
15207
+ - https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#apiservice-v1-apiregistration-k8s-io
15208
+ category: security
15209
+ technology:
15210
+ - kubernetes
15211
+ owasp:
15212
+ - A03:2017 - Sensitive Data Exposure
15213
+ - A02:2021 - Cryptographic Failures
15214
+ - A04:2025 - Cryptographic Failures
15215
+ subcategory:
15216
+ - vuln
15217
+ likelihood: MEDIUM
15218
+ impact: MEDIUM
15219
+ confidence: MEDIUM
15220
+ license: Semgrep Rules License v1.0. For more details, visit semgrep.dev/legal/rules-license
15221
+ vulnerability_class:
15222
+ - Mishandled Sensitive Information
15223
+ source: https://semgrep.dev/r/yaml.kubernetes.security.skip-tls-verify-service.skip-tls-verify-service
15224
+ shortlink: https://sg.run/zk10
15225
+ semgrep.dev:
15226
+ rule:
15227
+ r_id: 10117
15228
+ rv_id: 1263944
15229
+ rule_id: pKUGXr
15230
+ version_id: e1TyjnR
15231
+ url: https://semgrep.dev/playground/r/e1TyjnR/yaml.kubernetes.security.skip-tls-verify-service.skip-tls-verify-service
15232
+ origin: community
15233
+ languages:
15234
+ - yaml
15235
+ severity: WARNING
15195
15236
  - id: ruby.rails.security.audit.sqli.ruby-pg-sqli.ruby-pg-sqli
15196
15237
  mode: taint
15197
15238
  pattern-propagators:
@@ -15688,47 +15729,6 @@ rules:
15688
15729
  ...
15689
15730
  }
15690
15731
  severity: ERROR
15691
- - id: yaml.kubernetes.security.skip-tls-verify-service.skip-tls-verify-service
15692
- pattern: |
15693
- spec:
15694
- ...
15695
- insecureSkipTLSVerify: true
15696
- message: 'Service is disabling TLS certificate verification when communicating with
15697
- the server. This makes your HTTPS connections insecure. Remove the ''insecureSkipTLSVerify:
15698
- true'' key to secure communication.'
15699
- metadata:
15700
- cwe:
15701
- - 'CWE-319: Cleartext Transmission of Sensitive Information'
15702
- references:
15703
- - https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#apiservice-v1-apiregistration-k8s-io
15704
- category: security
15705
- technology:
15706
- - kubernetes
15707
- owasp:
15708
- - A03:2017 - Sensitive Data Exposure
15709
- - A02:2021 - Cryptographic Failures
15710
- - A04:2025 - Cryptographic Failures
15711
- subcategory:
15712
- - vuln
15713
- likelihood: MEDIUM
15714
- impact: MEDIUM
15715
- confidence: MEDIUM
15716
- license: Semgrep Rules License v1.0. For more details, visit semgrep.dev/legal/rules-license
15717
- vulnerability_class:
15718
- - Mishandled Sensitive Information
15719
- source: https://semgrep.dev/r/yaml.kubernetes.security.skip-tls-verify-service.skip-tls-verify-service
15720
- shortlink: https://sg.run/zk10
15721
- semgrep.dev:
15722
- rule:
15723
- r_id: 10117
15724
- rv_id: 1263944
15725
- rule_id: pKUGXr
15726
- version_id: e1TyjnR
15727
- url: https://semgrep.dev/playground/r/e1TyjnR/yaml.kubernetes.security.skip-tls-verify-service.skip-tls-verify-service
15728
- origin: community
15729
- languages:
15730
- - yaml
15731
- severity: WARNING
15732
15732
  - id: java.lang.security.audit.crypto.gcm-nonce-reuse.gcm-nonce-reuse
15733
15733
  metadata:
15734
15734
  functional-categories:
@@ -17179,81 +17179,6 @@ rules:
17179
17179
  - pattern: template
17180
17180
  - pattern: partial
17181
17181
  - pattern: file
17182
- - id: python.lang.security.audit.insecure-file-permissions.insecure-file-permissions
17183
- languages:
17184
- - python
17185
- severity: WARNING
17186
- metadata:
17187
- category: security
17188
- owasp:
17189
- - A01:2021 - Broken Access Control
17190
- - A01:2025 - Broken Access Control
17191
- cwe:
17192
- - 'CWE-276: Incorrect Default Permissions'
17193
- technology:
17194
- - python
17195
- references:
17196
- - https://owasp.org/Top10/A01_2021-Broken_Access_Control
17197
- cwe2022-top25: true
17198
- cwe2021-top25: true
17199
- subcategory:
17200
- - vuln
17201
- likelihood: LOW
17202
- impact: MEDIUM
17203
- confidence: MEDIUM
17204
- license: Semgrep Rules License v1.0. For more details, visit semgrep.dev/legal/rules-license
17205
- vulnerability_class:
17206
- - Improper Authorization
17207
- source: https://semgrep.dev/r/python.lang.security.audit.insecure-file-permissions.insecure-file-permissions
17208
- shortlink: https://sg.run/AXY4
17209
- semgrep.dev:
17210
- rule:
17211
- r_id: 13594
17212
- rv_id: 1263482
17213
- rule_id: zdUYqR
17214
- version_id: O9Tpxqr
17215
- url: https://semgrep.dev/playground/r/O9Tpxqr/python.lang.security.audit.insecure-file-permissions.insecure-file-permissions
17216
- origin: community
17217
- message: These permissions `$BITS` are widely permissive and grant access to more
17218
- people than may be necessary. A good default is `0o644` which gives read and write
17219
- access to yourself and read access to everyone else.
17220
- patterns:
17221
- - pattern-inside: os.$METHOD(...)
17222
- - metavariable-pattern:
17223
- metavariable: $METHOD
17224
- patterns:
17225
- - pattern-either:
17226
- - pattern: chmod
17227
- - pattern: lchmod
17228
- - pattern: fchmod
17229
- - pattern-either:
17230
- - patterns:
17231
- - pattern: os.$METHOD($FILE, $BITS, ...)
17232
- - metavariable-comparison:
17233
- metavariable: $BITS
17234
- comparison: $BITS >= 0o650 and $BITS < 0o100000
17235
- - patterns:
17236
- - pattern: os.$METHOD($FILE, $BITS)
17237
- - metavariable-comparison:
17238
- metavariable: $BITS
17239
- comparison: $BITS >= 0o100650
17240
- - patterns:
17241
- - pattern: os.$METHOD($FILE, $BITS, ...)
17242
- - metavariable-pattern:
17243
- metavariable: $BITS
17244
- patterns:
17245
- - pattern-either:
17246
- - pattern: <... stat.S_IWGRP ...>
17247
- - pattern: <... stat.S_IXGRP ...>
17248
- - pattern: <... stat.S_IWOTH ...>
17249
- - pattern: <... stat.S_IXOTH ...>
17250
- - pattern: <... stat.S_IRWXO ...>
17251
- - pattern: <... stat.S_IRWXG ...>
17252
- - patterns:
17253
- - pattern: os.$METHOD($FILE, $EXPR | $MOD, ...)
17254
- - metavariable-comparison:
17255
- metavariable: $MOD
17256
- comparison: $MOD == 0o111
17257
17182
  - id: php.doctrine.security.audit.doctrine-orm-dangerous-query.doctrine-orm-dangerous-query
17258
17183
  languages:
17259
17184
  - php
@@ -41417,3 +41342,78 @@ rules:
41417
41342
  - pattern-regex: \$\{\{\s*secrets\.
41418
41343
  - pattern-not-inside: 'jobs: ...'
41419
41344
  severity: WARNING
41345
+ - id: python.lang.security.audit.insecure-file-permissions.insecure-file-permissions
41346
+ languages:
41347
+ - python
41348
+ severity: WARNING
41349
+ metadata:
41350
+ category: security
41351
+ owasp:
41352
+ - A01:2021 - Broken Access Control
41353
+ - A01:2025 - Broken Access Control
41354
+ cwe:
41355
+ - 'CWE-276: Incorrect Default Permissions'
41356
+ technology:
41357
+ - python
41358
+ references:
41359
+ - https://owasp.org/Top10/A01_2021-Broken_Access_Control
41360
+ cwe2022-top25: true
41361
+ cwe2021-top25: true
41362
+ subcategory:
41363
+ - vuln
41364
+ likelihood: LOW
41365
+ impact: MEDIUM
41366
+ confidence: MEDIUM
41367
+ license: Semgrep Rules License v1.0. For more details, visit semgrep.dev/legal/rules-license
41368
+ vulnerability_class:
41369
+ - Improper Authorization
41370
+ source: https://semgrep.dev/r/python.lang.security.audit.insecure-file-permissions.insecure-file-permissions
41371
+ shortlink: https://sg.run/AXY4
41372
+ semgrep.dev:
41373
+ rule:
41374
+ r_id: 13594
41375
+ rv_id: 1263482
41376
+ rule_id: zdUYqR
41377
+ version_id: O9Tpxqr
41378
+ url: https://semgrep.dev/playground/r/O9Tpxqr/python.lang.security.audit.insecure-file-permissions.insecure-file-permissions
41379
+ origin: community
41380
+ message: These permissions `$BITS` are widely permissive and grant access to more
41381
+ people than may be necessary. A good default is `0o644` which gives read and write
41382
+ access to yourself and read access to everyone else.
41383
+ patterns:
41384
+ - pattern-inside: os.$METHOD(...)
41385
+ - metavariable-pattern:
41386
+ metavariable: $METHOD
41387
+ patterns:
41388
+ - pattern-either:
41389
+ - pattern: chmod
41390
+ - pattern: lchmod
41391
+ - pattern: fchmod
41392
+ - pattern-either:
41393
+ - patterns:
41394
+ - pattern: os.$METHOD($FILE, $BITS, ...)
41395
+ - metavariable-comparison:
41396
+ metavariable: $BITS
41397
+ comparison: $BITS >= 0o650 and $BITS < 0o100000
41398
+ - patterns:
41399
+ - pattern: os.$METHOD($FILE, $BITS)
41400
+ - metavariable-comparison:
41401
+ metavariable: $BITS
41402
+ comparison: $BITS >= 0o100650
41403
+ - patterns:
41404
+ - pattern: os.$METHOD($FILE, $BITS, ...)
41405
+ - metavariable-pattern:
41406
+ metavariable: $BITS
41407
+ patterns:
41408
+ - pattern-either:
41409
+ - pattern: <... stat.S_IWGRP ...>
41410
+ - pattern: <... stat.S_IXGRP ...>
41411
+ - pattern: <... stat.S_IWOTH ...>
41412
+ - pattern: <... stat.S_IXOTH ...>
41413
+ - pattern: <... stat.S_IRWXO ...>
41414
+ - pattern: <... stat.S_IRWXG ...>
41415
+ - patterns:
41416
+ - pattern: os.$METHOD($FILE, $EXPR | $MOD, ...)
41417
+ - metavariable-comparison:
41418
+ metavariable: $MOD
41419
+ comparison: $MOD == 0o111
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "source": "https://semgrep.dev/c/p/owasp-top-ten",
3
- "sha256": "977af4124aecaae7e8d7109515d5e12be256166d3f6403637fc754dc73ba9daf"
3
+ "sha256": "c682f940c04e9ddb09cb30a0219f6c9df5d8127af627bec82b6aed7bac2804f7"
4
4
  }