codesentry-semgrep-rules 0.1.11 → 0.3.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/README.md CHANGED
@@ -28,6 +28,11 @@ para o racional completo.
28
28
  diferente dos runtimes por plataforma) — ele é sempre instalado junto,
29
29
  independente do sistema operacional.
30
30
 
31
+ O manifesto `rules/ruleset.lock.json`, também exposto pelo pacote, registra a
32
+ versão do pacote, origem, data de captura, SHA-256 e, quando disponível, a
33
+ revisão upstream do snapshot. O comando `codesentry version --engines` lê
34
+ esse manifesto localmente para permitir auditoria sem rede.
35
+
31
36
  ## Não é para instalação direta
32
37
 
33
38
  Se você quer usar o CodeSentry, instale o pacote principal:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codesentry-semgrep-rules",
3
- "version": "0.1.11",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "description": "Snapshot local das regras OWASP do Semgrep para CodeSentry",
6
6
  "files": [
@@ -9,6 +9,7 @@
9
9
  "LICENSE"
10
10
  ],
11
11
  "exports": {
12
- "./rules/owasp.yml": "./rules/owasp.yml"
12
+ "./rules/owasp.yml": "./rules/owasp.yml",
13
+ "./rules/ruleset.lock.json": "./rules/ruleset.lock.json"
13
14
  }
14
15
  }
package/rules/owasp.yml CHANGED
@@ -17584,72 +17584,6 @@ rules:
17584
17584
  regex: ^(GET|HEAD|POST|POSTFORM)$
17585
17585
  - focus-metavariable: $URL
17586
17586
  severity: WARNING
17587
- - id: go.lang.security.injection.raw-html-format.raw-html-format
17588
- languages:
17589
- - go
17590
- severity: WARNING
17591
- message: Detected user input flowing into a manually constructed HTML string. You
17592
- may be accidentally bypassing secure methods of rendering HTML by manually constructing
17593
- HTML and this could create a cross-site scripting vulnerability, which could let
17594
- attackers steal sensitive user data. Use the `html/template` package which will
17595
- safely render HTML instead, or inspect that the HTML is rendered safely.
17596
- metadata:
17597
- cwe:
17598
- - 'CWE-79: Improper Neutralization of Input During Web Page Generation (''Cross-site
17599
- Scripting'')'
17600
- owasp:
17601
- - A07:2017 - Cross-Site Scripting (XSS)
17602
- - A03:2021 - Injection
17603
- - A05:2025 - Injection
17604
- category: security
17605
- technology:
17606
- - go
17607
- references:
17608
- - https://blogtitle.github.io/robn-go-security-pearls-cross-site-scripting-xss/
17609
- confidence: MEDIUM
17610
- cwe2022-top25: true
17611
- cwe2021-top25: true
17612
- subcategory:
17613
- - vuln
17614
- likelihood: HIGH
17615
- impact: MEDIUM
17616
- license: Semgrep Rules License v1.0. For more details, visit semgrep.dev/legal/rules-license
17617
- vulnerability_class:
17618
- - Cross-Site-Scripting (XSS)
17619
- source: https://semgrep.dev/r/go.lang.security.injection.raw-html-format.raw-html-format
17620
- shortlink: https://sg.run/3r1G
17621
- semgrep.dev:
17622
- rule:
17623
- r_id: 14443
17624
- rv_id: 1262968
17625
- rule_id: PeUonQ
17626
- version_id: 1QTyp2p
17627
- url: https://semgrep.dev/playground/r/1QTyp2p/go.lang.security.injection.raw-html-format.raw-html-format
17628
- origin: community
17629
- mode: taint
17630
- pattern-sources:
17631
- - patterns:
17632
- - pattern-either:
17633
- - pattern: |
17634
- ($REQUEST : *http.Request).$ANYTHING
17635
- - pattern: |
17636
- ($REQUEST : http.Request).$ANYTHING
17637
- - metavariable-regex:
17638
- metavariable: $ANYTHING
17639
- regex: ^(BasicAuth|Body|Cookie|Cookies|Form|FormValue|GetBody|Host|MultipartReader|ParseForm|ParseMultipartForm|PostForm|PostFormValue|Referer|RequestURI|Trailer|TransferEncoding|UserAgent|URL)$
17640
- pattern-sanitizers:
17641
- - pattern: html.EscapeString(...)
17642
- pattern-sinks:
17643
- - patterns:
17644
- - pattern-either:
17645
- - pattern: fmt.Printf("$HTMLSTR", ...)
17646
- - pattern: fmt.Sprintf("$HTMLSTR", ...)
17647
- - pattern: fmt.Fprintf($W, "$HTMLSTR", ...)
17648
- - pattern: '"$HTMLSTR" + ...'
17649
- - metavariable-pattern:
17650
- metavariable: $HTMLSTR
17651
- language: generic
17652
- pattern: <$TAG ...
17653
17587
  - id: go.lang.security.injection.tainted-sql-string.tainted-sql-string
17654
17588
  languages:
17655
17589
  - go
@@ -41152,6 +41086,72 @@ rules:
41152
41086
  - pattern-regex: \$\{\{\s*secrets\.
41153
41087
  - pattern-not-inside: 'jobs: ...'
41154
41088
  severity: WARNING
41089
+ - id: go.lang.security.injection.raw-html-format.raw-html-format
41090
+ languages:
41091
+ - go
41092
+ severity: WARNING
41093
+ message: Detected user input flowing into a manually constructed HTML string. You
41094
+ may be accidentally bypassing secure methods of rendering HTML by manually constructing
41095
+ HTML and this could create a cross-site scripting vulnerability, which could let
41096
+ attackers steal sensitive user data. Use the `html/template` package which will
41097
+ safely render HTML instead, or inspect that the HTML is rendered safely.
41098
+ metadata:
41099
+ cwe:
41100
+ - 'CWE-79: Improper Neutralization of Input During Web Page Generation (''Cross-site
41101
+ Scripting'')'
41102
+ owasp:
41103
+ - A07:2017 - Cross-Site Scripting (XSS)
41104
+ - A03:2021 - Injection
41105
+ - A05:2025 - Injection
41106
+ category: security
41107
+ technology:
41108
+ - go
41109
+ references:
41110
+ - https://blogtitle.github.io/robn-go-security-pearls-cross-site-scripting-xss/
41111
+ confidence: MEDIUM
41112
+ cwe2022-top25: true
41113
+ cwe2021-top25: true
41114
+ subcategory:
41115
+ - vuln
41116
+ likelihood: HIGH
41117
+ impact: MEDIUM
41118
+ license: Semgrep Rules License v1.0. For more details, visit semgrep.dev/legal/rules-license
41119
+ vulnerability_class:
41120
+ - Cross-Site-Scripting (XSS)
41121
+ source: https://semgrep.dev/r/go.lang.security.injection.raw-html-format.raw-html-format
41122
+ shortlink: https://sg.run/3r1G
41123
+ semgrep.dev:
41124
+ rule:
41125
+ r_id: 14443
41126
+ rv_id: 1262968
41127
+ rule_id: PeUonQ
41128
+ version_id: 1QTyp2p
41129
+ url: https://semgrep.dev/playground/r/1QTyp2p/go.lang.security.injection.raw-html-format.raw-html-format
41130
+ origin: community
41131
+ mode: taint
41132
+ pattern-sources:
41133
+ - patterns:
41134
+ - pattern-either:
41135
+ - pattern: |
41136
+ ($REQUEST : *http.Request).$ANYTHING
41137
+ - pattern: |
41138
+ ($REQUEST : http.Request).$ANYTHING
41139
+ - metavariable-regex:
41140
+ metavariable: $ANYTHING
41141
+ regex: ^(BasicAuth|Body|Cookie|Cookies|Form|FormValue|GetBody|Host|MultipartReader|ParseForm|ParseMultipartForm|PostForm|PostFormValue|Referer|RequestURI|Trailer|TransferEncoding|UserAgent|URL)$
41142
+ pattern-sanitizers:
41143
+ - pattern: html.EscapeString(...)
41144
+ pattern-sinks:
41145
+ - patterns:
41146
+ - pattern-either:
41147
+ - pattern: fmt.Printf("$HTMLSTR", ...)
41148
+ - pattern: fmt.Sprintf("$HTMLSTR", ...)
41149
+ - pattern: fmt.Fprintf($W, "$HTMLSTR", ...)
41150
+ - pattern: '"$HTMLSTR" + ...'
41151
+ - metavariable-pattern:
41152
+ metavariable: $HTMLSTR
41153
+ language: generic
41154
+ pattern: <$TAG ...
41155
41155
  - id: ruby.rails.security.injection.raw-html-format.raw-html-format
41156
41156
  languages:
41157
41157
  - ruby
@@ -1,4 +1,8 @@
1
1
  {
2
+ "schemaVersion": 1,
3
+ "packageVersion": "0.3.0",
4
+ "ruleset": "p/owasp-top-ten",
2
5
  "source": "https://semgrep.dev/c/p/owasp-top-ten",
3
- "sha256": "530adfc98727f31ea85e1f310500a41f224b1ef47847e84966827197fca11471"
6
+ "sha256": "2e2e1afa06df5e84d01f63372ac82b69ddcc4cd28efd45f375a1e8c910524146",
7
+ "capturedAt": "2026-09-13T18:30:54.019Z"
4
8
  }