bug(ocsf): attribute inspected HTTP requests to the policy that governs them
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- rust
- Domínio
- networking, security
Direção de pesquisa
Start in crates/openshell-supervisor-network/src/proxy.rs at the plain HTTP forward proxy decision event that copies firewall_rule from TCP authorization, then read crates/openshell-supervisor-network/src/l7/relay.rs around HTTP policy evaluation, which currently returns only allow/reason. Trace how the deciding request rule can reach the OCSF HTTP Activity record, including no-match/no-single-rule outcomes. Reproduce with two policies on one host/port and a fresh connection sending a GET/PUT permitted only by the other entry; done when the record names the request-permitting entry.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
User Story
I use OpenShell to monitor egress from agent sandboxes. I need the OCSF HTTP Activity record to identify the policy that governed each request so I can group activity by policy key.
Problem Statement
When multiple network policies permit a TCP connection to the same host and port, OpenShell can report the connection's policy key on the HTTP Activity record even though a different policy allowed the HTTP request. A single request on a fresh connection is enough to hit this. Reused connections can also carry requests governed by different policies.
The plain HTTP forward proxy handles one request per connection. Its HTTP decision event sets firewall_rule from the earlier TCP authorization, while the separate HTTP evaluation returns only an allow result and a reason. Forward proxy source · HTTP policy evaluation
Impact / Why This Matters
An operator can audit a successful request under the wrong policy key. A detector that groups requests by policy can count the request against the wrong rule. The planned Close and Traffic events report connection-wide measurements, which consumers need to distinguish from request attribution. See #5919 and #5921.
Acceptance Criteria
- When multiple entries allow the TCP connection and one permits the inspected HTTP request, the HTTP Activity record identifies the entry that permitted the request. Cover a single request on a fresh connection.
- Where inspected connections support reuse, requests governed by different policy keys have the correct attribution in their own HTTP Activity records.
- If no request rule matches, or the evaluator has no single deciding rule, the event represents that outcome explicitly. It does not present a TCP policy key as a request match.
- Connection records retain their connection-level meaning. The fix preserves request allow and deny behavior.
Reproduction Steps
- Configure two OpenShell network policies for the same host and port. Give them distinct inspected HTTP rules, such as a read rule for GET and a write rule for PUT.
- Enable OCSF JSON output and create an OpenShell sandbox with the policy.
- Use a fresh proxied TCP connection to send one HTTP request that only the policy entry other than the recorded TCP match permits.
- Compare the resulting OCSF HTTP Activity record's
firewall_rulewith the policy entry that permits the request.
Environment
- OpenShell: source inspected on main at
2ac724f0e48c9ef3563cace83978f22e4f10fb42. - Relevant path: supervisor plain HTTP forward proxy with HTTP inspection enabled.
- The steps describe the reported case. This filing used source inspection and did not rerun the deployment.
- Linguagem predominante
- Rust
- Estrelas
- 21.5k
- Forks
- 2.1k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NVIDIA/OpenShell
-
state:triage-needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
-
state:triage-needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failureTalvez já em andamento @TaylorMutch assumiu há 9 dias. Abertastate:accepted state:pr-opened
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
state:triage-needed
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 78/100
-
state:triage-needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Todas as issues de NVIDIA/OpenShell
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 2 dias
-
autofixer: follow-up
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
tursodatabase/turso#12531 ·
Mantenedores costumam responder em até 1 dia
-
bug help wanted ui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
userFRM/egui-charts#4292 ·
Mantenedores costumam responder em até 1 dia
-
CHANGELOG.md out of dateAbertaIssue-Bug Need-Review
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 85/100
PowerShell/DSC#1832 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia