Skip to main content

Documentation Index

Fetch the complete documentation index at: https://snakysec.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Getting Started

Démarrage rapide pour contribuer au moteur d’audit PowerShell (côté src/). Pour la plateforme SaaS (Next.js), voir platform/README.md.

Prérequis

  • PowerShell 7+
  • Modules PS installés automatiquement au démarrage du runner, ou manuellement :
Install-Module Microsoft.Graph.Authentication -Scope CurrentUser -Force
Install-Module ExchangeOnlineManagement        -Scope CurrentUser -Force
Install-Module PnP.PowerShell                  -Scope CurrentUser -Force
Install-Module MicrosoftTeams                  -Scope CurrentUser -Force

App registration Entra (côté tenant cible)

Créer un app registration par tenant audité et accorder les permissions Graph documentées. Auth app-only via cert X.509 (pas de client secret).

Auth local hors CI

Export un access token Graph à la main (via Connect-MgGraph) ou utiliser le cert X.509 configuré pour le tenant :
# Exemple avec token Graph pré-acquis
$token = "<access-token>"

pwsh ./src/runners/Invoke-CISAudit.ps1 `
  -TenantId  '<guid>' `
  -TenantName 'Contoso' `
  -ClientId  '<app-registration-id>' `
  -AccessToken $token `
  -ProductArea entra
Frameworks disponibles :
  • src/runners/Invoke-CISAudit.ps1 — CIS M365 v6.0.1 (140 contrôles)
  • src/runners/Invoke-SCuBAAudit.ps1 — CISA SCuBA v1.5.0 (94 contrôles)
Product areas acceptées : entra | exchange | teams | sharepoint | defender | purview | fabric | intune | all (selon framework).

Sorties

Artefacts JSON schema v3 dans :
artifacts/audit/<framework>-<product-area>-<tenantId>-<timestamp>.json
Voir report-model.md pour la structure.

Auth en CI (production)

En CI, le runner utilise OIDC Workload Identity Federation — aucun token ou secret long-lived stocké. Le pipeline GitLab échange son OIDC ID token contre un access token Graph via client_assertion fédéré. Déclencher un audit depuis l’UI plateforme (/dashboard/audits/new) ou l’API /api/v1/audits/trigger.

Étapes suivantes