Policy inheritance: child layers should only narrow unmanaged_files.exclude

Aperta
#4,935 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
python
Ambito
security

Direzione di ricerca

Start with merge_policies in src/apm_cli/policy/inheritance.py, around lines 312-315, where unmanaged_files.exclude is merged as a union. Then look at how apm audit reports governed paths. The design rule (intersect versus restrict to the parent's excluded paths) is still open and needs a maintainer decision before code. Done means a merge test where a child ** exclude leaves the parent's governed directories enforced, an audit test for the warning text, and updated policy schema and inheritance docs.

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

Descrizione

needs-design

Summary

When org policies are inherited (extends), merge_policies tightens every deny-class field from parent to child, with one exception: unmanaged_files.exclude is merged as a union (src/apm_cli/policy/inheritance.py, around lines 312-315). A child layer can therefore add a broad exclude pattern, for example **, which removes every governed path from an inherited unmanaged_files.action: deny.

This is documented behaviour today, so this issue is a design proposal, not a defect report.

Proposal

  1. Child layers may only narrow unmanaged_files.exclude: a child exclude is accepted only where it does not widen what the parent excludes. The exact rule needs design (for example, intersect the sets, or accept child patterns only inside the parent's excluded paths).
  2. apm audit warns when an effective child exclude pattern covers a directory the parent policy governs.

Compatibility

Narrowing the union changes behaviour for existing inherited policies that rely on child excludes. It needs a product decision and a migration note before it ships.

Acceptance

  • A merge cell where a child exclude ** under a parent action: deny leaves the parent's governed directories enforced.
  • An audit cell with the warning text when a child exclude covers a governed directory.
  • Docs updated in the policy schema reference and the inheritance guide.
Lingua principale
Python
Stelle
4.4k
Fork
430
Merge medio
19h 38m
PR unite (30g)
637

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 microsoft/apm

Tutte le issue di microsoft/apm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.