inaabi / Guides / Write a control exception a reviewer can use
Write a control exception a reviewer can use
A one-file record for a STIG finding, CIS recommendation, or other control you will not apply, plus a check that the required fields are present.
Tested on Debian GNU/Linux 12 (bookworm), 2026-12-04.
A failed check is unfinished when the only record is "we know, leave it." The next reviewer asks who accepted it, what else covers it, and when it expires. This page is that file and a check that the file has the fields. It does not approve the exception. A person who owns the system does that. Passing the check does not certify the server against any standard.
Write the file
Use these headings, in this order. The check matches the heading lines. Do not rename them.
# Exception
- Control: the id from the STIG or the Benchmark you opened
- Standard: the document name and version
- System: the host name
- Owner: the person who accepts the risk
- Written: 2026-12-04
- Expires: 2027-03-04
## Reason
What breaks if you apply the control, in concrete terms. "Required by the business" is not a reason.
## Compensating control
The thing a reviewer can see instead: a firewall rule, a second log, a physical control. Name the ticket. Restating the reason is not a compensating control.
## What would close this
The change that lets you delete this file.
The reason has to say what breaks. The compensating control has to be something you can show. An exception with a blank expiry is a permanent waiver.
Run the check
Save this as exception-check.sh:
#!/bin/bash
set -u
fail=0
for f in "$@"; do
for h in '^# Exception$' '^- Control:' '^- Standard:' '^- System:' '^- Owner:' '^- Written:' '^- Expires:' '^## Reason$' '^## Compensating control$' '^## What would close this$'; do
if ! grep -qE "$h" "$f"; then
echo "missing [$h] in $f"
fail=1
fi
done
if grep -qE '^- (Written|Expires):[[:space:]]*$' "$f"; then
echo "blank date in $f"
fail=1
fi
done
exit "$fail"
A complete sample exited 0 and printed nothing. The same file with the ## Compensating control heading removed exited 1 and printed missing [^## Compensating control$]. Both runs were on Debian 12 on 2026-12-04.
bash exception-check.sh exception.md
echo "exit=$?"
Delete it when the control is met
Undo of creating the file is rm of that path. After rm, ls of the path failed with "No such file or directory". Copying the saved file back made the check exit 0 again. Close the exception in the same ticket that applies the fix. Restoring the file puts the exception back, which is what you want only if the control is still unmet.
The record is text. It does not depend on Ubuntu, Debian, or Enterprise Linux. The control id does. A Debian host does not get a RHEL 9 STIG id unless you checked that the finding is the same setting and you say so under Reason. The pages that usually need one of these are the STIG check, the CIS page, and the PCI page.
Questions
Does a complete file mean the exception is approved?
No. The check only proves the headings and the dates are present. The owner named in the file is the person who accepts it.
Can the expiry be empty if the control can never be met?
No. Write a date and review it. A blank date fails the check. A far date is still a date someone has to look at again.