Policy inheritance: child layers should only narrow unmanaged_files.exclude

Abierto
#4,935 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
python
Área
security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Python
Estrellas
4.4k
Forks
430
Merge medio
19 h 38 min
PR fusionados (30 d)
637

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/apm

Todos los issues de microsoft/apm

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.