ci(security): allow documented Command Code env vars
This commit is contained in:
@@ -89,8 +89,6 @@ rules:
|
|||||||
- "**/*.ts"
|
- "**/*.ts"
|
||||||
- "**/index.ts"
|
- "**/index.ts"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ────────────────────────────────────────────────────────────────────────
|
# ────────────────────────────────────────────────────────────────────────
|
||||||
# Supply chain: dependency injection
|
# Supply chain: dependency injection
|
||||||
# ────────────────────────────────────────────────────────────────────────
|
# ────────────────────────────────────────────────────────────────────────
|
||||||
@@ -209,8 +207,8 @@ rules:
|
|||||||
- id: pi-extension-unusual-import
|
- id: pi-extension-unusual-import
|
||||||
patterns:
|
patterns:
|
||||||
- pattern-either:
|
- pattern-either:
|
||||||
- pattern: "import $X from \"...\""
|
- pattern: 'import $X from "..."'
|
||||||
- pattern: "const $X = require(\"...\")"
|
- pattern: 'const $X = require("...")'
|
||||||
- metavariable-regex:
|
- metavariable-regex:
|
||||||
metavariable: $X
|
metavariable: $X
|
||||||
regex: "(compression|pako|zlib|tar|stream|archiver|request|axios|needle|got|superagent|node-fetch|undici)"
|
regex: "(compression|pako|zlib|tar|stream|archiver|request|axios|needle|got|superagent|node-fetch|undici)"
|
||||||
@@ -256,10 +254,10 @@ rules:
|
|||||||
- pattern: process.env.$VAR
|
- pattern: process.env.$VAR
|
||||||
- metavariable-regex:
|
- metavariable-regex:
|
||||||
metavariable: $VAR
|
metavariable: $VAR
|
||||||
regex: "(?!COMMANDCODE_|NODE_|PATH|HOME|SHELL|USER|LANG|LC_|TERM|TMPDIR|NIX_).*"
|
regex: "(?!COMMANDCODE_|COMMAND_CODE_|CMD_ZDR|NODE_|PATH|HOME|SHELL|USER|LANG|LC_|TERM|TMPDIR|NIX_).*"
|
||||||
message: >
|
message: >
|
||||||
Reading unexpected environment variable $VAR. Provider should only
|
Reading unexpected environment variable $VAR. Provider should only
|
||||||
read COMMANDCODE_* variables.
|
read documented Command Code or standard runtime variables.
|
||||||
severity: WARNING
|
severity: WARNING
|
||||||
languages: [javascript, typescript]
|
languages: [javascript, typescript]
|
||||||
paths:
|
paths:
|
||||||
@@ -270,4 +268,3 @@ rules:
|
|||||||
# ────────────────────────────────────────────────────────────────────────
|
# ────────────────────────────────────────────────────────────────────────
|
||||||
# OAuth flow manipulation
|
# OAuth flow manipulation
|
||||||
# ────────────────────────────────────────────────────────────────────────
|
# ────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user