Allow command allowlists in company restricted mode
Nessuno ha ancora preso questa issue.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 2.1k
- Fork
- 157
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Summary
Add support for administrators to define a whitelist of shell commands that the agent may run when company restricted mode is enabled and allow-all is disabled.
Problem
Restricted mode blocks commands by default, but teams may still need a small set of safe, routine commands for development workflows. Currently, enabling these workflows may require relaxing the broader allow-all restriction, weakening the intended security boundary.
Proposed solution
Provide an administrator-managed command allowlist for company restricted mode:
- Commands matching the allowlist are permitted without an additional approval prompt.
- Non-matching commands remain blocked or follow the existing approval flow.
- The allowlist can be managed centrally at the company, organization, repository, or user scope.
- Matching supports exact commands and explicitly constrained arguments, rather than unrestricted substring matching.
- The UI indicates when a command was allowed by an administrator-defined rule.
- Audit logs record the command, matched rule, user, repository, and timestamp.
Example allowed commands could include:
git status
git diff --check
swiftlint
npm test
Security considerations
The implementation must prevent bypasses through shell operators, command substitution, pipelines, redirects, aliases, path traversal, and argument injection. Rules should be validated before activation, and administrators should be able to review, update, and disable them.
Acceptance criteria
- Administrators can configure and manage a company-level command allowlist.
- The allowlist works while restricted mode is enabled and
allow-allis disabled. - Non-matching commands retain the existing restriction behavior.
- Matching is deterministic, documented, and resistant to shell-injection bypasses.
- Allowed-command decisions are visible to users and captured in audit logs.
- Existing behavior is unchanged when no allowlist is configured.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
L’issue non indica file, test o punti di ingresso concreti. Inizia individuando il percorso di autorizzazione esistente per restricted-mode e allow-all, il flusso di approvazione, la gestione dell’esecuzione dei comandi, la visualizzazione delle decisioni nella UI e la gestione dell’audit log; il lavoro è completato quando una allowlist gestita centralmente e resistente alle injection funziona a livello aziendale senza modificare il comportamento quando è assente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, shell
- Ambito
- authorization, devtools, security
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100