anyshift-io/sre-skills / skills/sqs-queue-auditor
sqs-queue-auditor
Verifiedtests/replay_08_clean_standard.py
View on GitHub"""
Replay test for examples/08-clean-standard.md.
The control case: a correctly-configured queue must produce zero findings. This
guards against false positives, which are how an auditor loses an operator's trust.
Stdlib only. Run with: `python tests/replay_08_clean_standard.py`.
"""
from __future__ import annotations
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent))
from _audit import run_audit # noqa: E402
from _replay import report # noqa: E402
FIXTURE_DIR = Path(__file__).parent.parent / "fixtures" / "08-clean-standard"
def main() -> int:
audit = run_audit(FIXTURE_DIR, is_processing_queue=True)
assertions = [
(audit.has_dlq is True, "queue has a well-sized DLQ"),
# Zero findings: deliberate visibility (180s), default retention, DLQ at 14d,
# maxReceiveCount 5, SSE on, and a resource policy scoped by aws:SourceArn.
(audit.clean is True, f"clean queue should produce no findings, got {sorted(audit.codes())}"),
(audit.top_severity is None, f"clean queue should have no top severity, got {audit.top_severity}"),
# The wildcard-principal policy here is narrowed by aws:SourceArn, so R7 must NOT fire.
("R7" not in audit.codes(), "an aws:SourceArn-conditioned policy must not trip R7"),
# Even a clean queue still reports the boundary: a clean config is not a clean system.
(len(audit.boundary) >= 4, f"expected >=4 boundary notes even when clean, got {len(audit.boundary)}"),
]
return report("replay_08_clean_standard", audit, assertions)
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |