Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

security: guard and protected-config lists miss hook managers, package-manager, CI and devcontainer files, and some secret files

Aperta Adatta ai principianti
#283 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
security

Direzione di ricerca

Inizia da src/main/tools/guard.ts e src/main/tools/sandbox_config.ts per vedere come vengono confrontati GUARDED, SECRETS e PROTECTED_CONFIG, poi leggi guard.test.ts e i test della configurazione della sandbox. Aggiungi test per i pattern elencati relativi a hook, gestori di pacchetti, CI, devcontainer, agenti e file di segreti. Il lavoro è completato quando i nuovi casi sono coperti e i test esistenti continuano a passare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

priority: medium security severity: low

Found in the Oct 11 audit (at c5f5641). Follow-up to #236, #262 and #271.

Where: src/main/tools/guard.ts:18-39 (GUARDED, SECRETS); src/main/tools/sandbox_config.ts:9-35 (PROTECTED_CONFIG).

.husky/, .git/ and .github/ are protected because their contents run outside the sandbox later. Files that work the same way are not:

  • Hook managers: .pre-commit-config.yaml (repo: local hooks), lefthook.yml / .lefthook.yml, .simple-git-hooks.*
  • Package managers: .yarnrc.yml (yarnPath), .pnpmfile.cjs
  • CI: .gitlab-ci.yml, .circleci/, azure-pipelines.yml, bitbucket-pipelines.yml, .travis.yml, Jenkinsfile
  • Editor config that runs on the host: .devcontainer/ (initializeCommand), *.code-workspace (folder-open tasks)
  • Other agents' config: GEMINI.md, .cursorrules, .windsurfrules, .clinerules, .roo/, .aider.conf.yml

Missing from SECRETS (these files are also embedded for search, code_index.ts:291): .git-credentials (the .git(/|$) pattern does not match it), *.env such as prod.env, credentials.json, *.tfvars, terraform.tfstate.

Impact: in Auto mode an edit, or a sandboxed command, can plant a command that runs unsandboxed on the user's next commit, yarn, CI run or devcontainer open, without an approval card.

Fix: extend GUARDED, SECRETS and PROTECTED_CONFIG, with tests in guard.test.ts and the sandbox config tests.

Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
5h 28m
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PierrunoYT/patch

Tutte le issue di PierrunoYT/patch

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.