Skip to content

Commit 36cdc3b

Browse files
committed
Merge security engineering standard into dev
2 parents 27dc0cc + 8b61164 commit 36cdc3b

3 files changed

Lines changed: 146 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ SACS Oreo is a Python CLI for authorized web application security assessment, cr
44

55
> Legal notice: use Oreo only on systems you own or have explicit written authorization to test. This MVP does not perform brute force, credential attacks, authentication bypass, exploit chaining, denial-of-service behavior, or destructive payload execution.
66
7+
## Security Engineering
8+
9+
Oreo is developed as security software. Changes should follow the [Security Engineering Standard](docs/security-engineering.md), including authorization-first behavior, safe defaults, bounded request behavior, safe parsing, escaped report output, dependency discipline, and pre-merge security checks.
10+
711
## Current Stage
812

913
Oreo is at **MVP / Variant 1** stage. It is suitable as a foundation for a professional web application vulnerability analyzer, but it is not yet a mature replacement for a full assessment platform.

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
Project documentation for SACS Oreo lives here.
44

55
- [Methodology](methodology.md): assessment philosophy, scan modes, evidence handling, confidence, reproducibility, severity, and false-positive handling.
6+
- [Security Engineering Standard](security-engineering.md): secure development principles, threat-model prompts, dependency discipline, and pre-merge checklist.

docs/security-engineering.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Security Engineering Standard
2+
3+
SACS Oreo is security software. Every change should be designed, reviewed, and tested with that in mind. This document defines the baseline engineering discipline for keeping Oreo safe, credible, and useful for authorized assessment work.
4+
5+
## Core Principles
6+
7+
Oreo should help defenders understand risk without creating unnecessary risk for the systems being assessed.
8+
9+
- Authorization comes first. Features must preserve clear operator responsibility and visible scan intent.
10+
- Safe defaults are mandatory. Passive and safe behavior should be easier to use than aggressive behavior.
11+
- Assessment behavior must be explainable. A maintainer should be able to describe what each check sends, observes, stores, and reports.
12+
- Evidence must be useful but restrained. Capture enough to reproduce and validate findings without needlessly storing secrets or personal data.
13+
- False positives are a security risk. Noisy findings reduce trust and can cause teams to ignore real issues.
14+
- Oreo prioritizes exposure analysis, misconfiguration detection, evidence-based reporting, and remediation guidance over exploit automation.
15+
16+
## Threat Model For Oreo Changes
17+
18+
Before adding or changing a feature, consider how it could fail or be misused.
19+
20+
Key questions:
21+
22+
- Could this send unexpected traffic, payloads, or request volume to a target?
23+
- Could this cross the authorized host, scheme, port, path, or organization scope?
24+
- Could this store credentials, session tokens, API keys, personal data, or sensitive response bodies in reports or logs?
25+
- Could this render untrusted target content into HTML reports without escaping?
26+
- Could a crafted config file, URL, header, cookie, response, or report field trigger unsafe behavior?
27+
- Could the feature make high-confidence claims from weak evidence?
28+
- Could this dependency or parser introduce unsafe loading, code execution, path traversal, or network behavior?
29+
30+
If the answer is yes or unclear, the feature needs additional controls, tests, documentation, or a safer design.
31+
32+
## Input Handling
33+
34+
All external input is untrusted, including CLI arguments, config files, target URLs, HTTP responses, forms, cookies, headers, robots.txt, sitemap.xml, and future plugin output.
35+
36+
Rules:
37+
38+
- Normalize and validate URLs before use.
39+
- Keep crawler scope explicit and same-host unless a future feature intentionally expands scope with visible authorization controls.
40+
- Parse structured data with safe parsers. Do not use unsafe YAML loaders or dynamic evaluation.
41+
- Treat config values as data, not commands.
42+
- Validate numeric limits such as `max_pages`, `timeout`, `crawl_delay`, and `requests_per_second` before they affect scan behavior.
43+
- Keep custom headers and cookies operator-supplied only. Do not invent authentication material.
44+
45+
## HTTP Safety
46+
47+
Oreo must make request behavior predictable.
48+
49+
Rules:
50+
51+
- Default to bounded crawling and controlled request pacing.
52+
- Preserve scan modes: `passive`, `safe`, and future `active` behavior must remain visibly distinct.
53+
- Passive mode must not send validation payloads or extra probe requests.
54+
- Safe mode may use harmless validation probes only when they are documented and non-destructive.
55+
- Do not add brute force, credential attacks, authentication bypass, exploit chaining, destructive payloads, or denial-of-service behavior.
56+
- Any future active behavior must be separately gated, documented, rate-limited, and tested before release.
57+
58+
## Evidence And Reporting Safety
59+
60+
Reports are part of the product attack surface. They must be safe to open and safe to share within an authorized team.
61+
62+
Rules:
63+
64+
- Escape all untrusted content before rendering HTML.
65+
- Avoid embedding raw response bodies unless there is a strong reason and a size limit.
66+
- Prefer concise evidence snippets, status codes, headers, URLs, and reproducible request metadata.
67+
- Redact or avoid storing obvious secrets such as API keys, tokens, passwords, private keys, and session cookies.
68+
- Keep findings structured so JSON, HTML, dashboards, and future integrations use the same data contract.
69+
- Include severity, confidence, reproducibility, OWASP mapping where applicable, business impact, and remediation guidance.
70+
- Be careful with Africa and Nigeria SME impact text: make it practical, specific, and human, without fearmongering.
71+
72+
## Dependency Discipline
73+
74+
Dependencies should earn their place.
75+
76+
Rules:
77+
78+
- Prefer the Python standard library when it is safe and sufficient.
79+
- Add third-party packages only when they materially improve safety, correctness, or maintainability.
80+
- Use safe APIs from dependencies, such as `yaml.safe_load` for YAML.
81+
- Keep dependency versions compatible with the supported Python matrix.
82+
- After dependency changes, verify editable install and the full test suite.
83+
- Watch for dependency behavior that performs unexpected network access, dynamic imports, unsafe deserialization, or shell execution.
84+
85+
## File And Path Safety
86+
87+
Oreo writes reports and may later write evidence artifacts. File handling must be boring and predictable.
88+
89+
Rules:
90+
91+
- Write only to operator-selected output directories or documented defaults.
92+
- Do not write outside the project or output path through unsanitized target-controlled names.
93+
- Avoid using target URLs directly as filesystem paths without sanitization.
94+
- Keep generated reports, scan outputs, captures, screenshots, and evidence out of Git by default.
95+
- Never commit secrets, live credentials, customer data, or private scan results.
96+
97+
## Finding Quality
98+
99+
A finding is not just a string in a report. It is a claim Oreo makes about a target.
100+
101+
Rules:
102+
103+
- Evidence must support the title and severity.
104+
- Confidence should reflect how direct the observation is.
105+
- Reproducibility should explain how stable or repeatable the observation is.
106+
- Severity should consider exploitability, business impact, exposure, and confidence.
107+
- Avoid upgrading severity based only on generic best-practice language.
108+
- Prefer fewer, better findings over noisy output.
109+
- Group or deduplicate repeated evidence when the same issue appears across many URLs.
110+
111+
## Pre-Merge Security Checklist
112+
113+
Use this before merging feature work into `dev`.
114+
115+
- The feature preserves authorization-first behavior.
116+
- Scan mode behavior is clear and tested where relevant.
117+
- Request volume and scope are bounded.
118+
- Untrusted input is parsed safely and validated.
119+
- HTML report output escapes untrusted content.
120+
- JSON output remains structured and stable.
121+
- Sensitive evidence is avoided or redacted where practical.
122+
- Findings include useful evidence, severity, confidence, reproducibility, and remediation.
123+
- Dependencies are minimal, justified, and compatible with Python 3.10, 3.11, and 3.12.
124+
- Unit tests cover normal behavior and at least one failure or edge case.
125+
- Local tests pass before pushing.
126+
- GitHub Actions pass before merging.
127+
128+
## Red Lines
129+
130+
The following do not belong in Oreo unless the project intentionally changes policy and adds strong safeguards:
131+
132+
- credential stuffing or password guessing
133+
- brute-force login attempts
134+
- authentication bypass automation
135+
- destructive payloads
136+
- exploit chaining against live targets
137+
- denial-of-service tests
138+
- stealth, evasion, or persistence features
139+
- automatic data extraction from sensitive files beyond minimal evidence needed for a finding
140+
141+
Oreo should become powerful because it is careful, reproducible, and trusted. That is a stronger foundation than becoming another exploit launcher.

0 commit comments

Comments
 (0)