Repository navigation
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
28 lines (28 loc) · 2.33 KB
/
Copy path.coderabbit.yaml
File metadata and controls
28 lines (28 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
reviews:
path_instructions:
- path: "{powershell,tests,build}/**"
instructions: |
For every added, moved or renamed file, check that its folder follows the repository layout in AGENTS.md
("Repository layout — where files go"): lowercase kebab-case folder names, the shared service names, and the
documented group folders under powershell/public and powershell/internal. Flag a file placed by the check
that first needed it rather than by its job, and suggest the folder it belongs in.
- path: "{powershell,tests,packs}/**"
instructions: |
Maester reports on one snapshot of the tenant. Every check, pack and helper reads Microsoft Graph and GitHub
through the session cache (Invoke-MtGraphRequest, Invoke-MtGitHubRequest), so checks that ask for the same
data see the same answer. This is by design.
Never suggest -DisableCache, -NoCache, clearing the cache, or otherwise bypassing it in a check, a pack or a
helper, including to "read current data", to pick up changes made during a session, or to avoid stale group
membership. A run is not expected to see changes made while it runs. powershell/tests/general/GraphCacheUsage.Tests.ps1
fails on any DisableCache use outside the transport helpers it allows, so such a suggestion cannot be applied.
Improvements to how the cache itself works (for example its cache key) are fine to raise.
- path: "tests/{cis,cisa}/**"
instructions: |
A benchmark test does what the benchmark's PowerShell audit procedure does: it reads the same objects and
passes on the same condition (website/docs/writing-tests/index.mdx, "What a benchmark test evaluates").
Where the CIS audit reads every object (for example every Get-HostedOutboundSpamFilterPolicy result in 6.2.1),
the test reads every object, including ones no user receives. Where it reads one object (for example
-Identity Default in 2.1.15), the test reads only that one. Do not suggest narrowing a test to the policies
users receive, or widening it to policies the audit does not read. Use the thresholds the audit names or its
script sets. A test fails or errors, never passes, when the audited object is not returned.
Before suggesting a change in scope, quote the audit step that supports it.