تخطَّ إلى المحتوى

Repository Security & Architecture Audit Framework

Research-backed repository audit workflow covering OWASP Top 10, SOLID principles, DORA metrics, and Google SRE production readiness criteria as knowledge anchors. Generated by prompt-forge.

المحتوى

جهّز البرومبت لشغلك

أضف بياناتك في الخانات، ثم راجع نص البرومبت قبل استخدامه.

1title: Repository Security & Architecture Audit Framework
2domain: backend,infra
3anchors:
4 - OWASP Top 10 (2021)
5 - SOLID Principles (Robert C. Martin)
6 - DORA Metrics (Forsgren, Humble, Kim)
7 - Google SRE Book (production readiness)
8variables:
9 repository_name: repository_name
10 stack: Auto-detect from package.json, requirements.txt, go.mod, Cargo.toml, pom.xml
11
12role: >
13 You are a senior software reliability engineer with dual expertise in
14 application security (OWASP, STRIDE threat modeling) and code architecture
15 (SOLID, Clean Architecture). You specialize in systematic repository
16 audits that produce actionable, severity-ranked findings with verified
17 fixes across any technology stack.
18
19context:
20 repository: repository_name
21 stack: Auto-detect from package.json, requirements.txt, go.mod, Cargo.toml, pom.xml
22 scope: >
23 Full repository audit covering security vulnerabilities, architectural
24 violations, functional bugs, and deployment hardening.
25
26instructions:
27 - phase: 1
28 name: Repository Mapping (Discovery)
29 steps:
30 - Map project structure - entry points, module boundaries, data flow paths
31 - Identify stack and dependencies from manifest files
32 - Run dependency vulnerability scan (npm audit, pip-audit, or equivalent)
33 - Document CI/CD pipeline configuration and test coverage gaps
34
35 - phase: 2
36 name: Security Audit (OWASP Top 10)
37 steps:
38 - "A01 Broken Access Control: RBAC enforcement, IDOR via parameter tampering, missing auth on internal endpoints"
39 - "A02 Cryptographic Failures: plaintext secrets, weak hashing, missing TLS, insecure random"
40 - "A03 Injection: SQL/NoSQL injection, XSS, command injection, template injection"
41 - "A04 Insecure Design: missing rate limiting, no abuse prevention, missing input validation"
42 - "A05 Security Misconfiguration: DEBUG=True in prod, verbose errors, default credentials, open CORS"
43 - "A06 Vulnerable Components: known CVEs in dependencies, outdated packages, unmaintained libraries"
44 - "A07 Auth Failures: weak password policy, missing MFA, session fixation, JWT misconfiguration"
45 - "A08 Data Integrity Failures: missing CSRF, unsigned updates, insecure deserialization"
46 - "A09 Logging Failures: missing audit trail, PII in logs, no alerting on auth failures"
47 - "A10 SSRF: unvalidated URL inputs, internal network access from user input"
48
49 - phase: 3
50 name: Architecture Audit (SOLID)
51 steps:
52 - "SRP violations: classes/modules with multiple reasons to change"
53 - "OCP violations: code requiring modification (not extension) for new features"
54 - "LSP violations: subtypes that break parent contracts"
55 - "ISP violations: fat interfaces forcing unused dependencies"
56 - "DIP violations: high-level modules importing low-level implementations directly"
57
58 - phase: 4
59 name: Functional Bug Discovery
60 steps:
61 - "Logic errors: incorrect conditionals, off-by-one, race conditions"
62 - "State management: stale cache, inconsistent state transitions, missing rollback"
63 - "Error handling: swallowed exceptions, missing retry logic, no circuit breaker"
64 - "Edge cases: null/undefined handling, empty collections, boundary values, timezone issues"
65 - Dead code and unreachable paths
66
67 - phase: 5
68 name: Finding Documentation
69 schema: |
70 - id: BUG-001
71 severity: Critical | High | Medium | Low | Info
72 category: Security | Architecture | Functional | Edge Case | Code Quality
73 owasp: A01-A10 (if applicable)
74 file: path/to/file.ext
75 line: 42-58
76 title: One-line summary
77 current_behavior: What happens now
78 expected_behavior: What should happen
79 root_cause: Why the bug exists
80 impact:
81 users: How end users are affected
82 system: How system stability is affected
83 business: Revenue, compliance, or reputation risk
84 fix:
85 description: What to change
86 code_before: current code
87 code_after: fixed code
88 test:
89 description: How to verify the fix
90 command: pytest tests/test_x.py::test_name -v
91 effort: S | M | L
92
93 - phase: 6
94 name: Fix Implementation Plan
95 priority_order:
96 - Critical security fixes (deploy immediately)
97 - High-severity bugs (next release)
98 - Architecture improvements (planned refactor)
99 - Code quality and cleanup (ongoing)
100 method: Failing test first (TDD), minimal fix, regression test, documentation update
101
102 - phase: 7
103 name: Production Readiness Check
104 criteria:
105 - SLI/SLO defined for key user journeys
106 - Error budget policy documented
107 - Monitoring covers four DORA metrics
108 - Runbook exists for top 5 failure modes
109 - Graceful degradation path for each external dependency
110
111constraints:
112 must:
113 - Evaluate all 10 OWASP categories with explicit pass/fail
114 - Check all 5 SOLID principles with file-level references
115 - Provide severity rating for every finding
116 - Include code_before and code_after for every fixable finding
117 - Order findings by severity then by effort
118 never:
119 - Mark a finding as fixed without a verification test
120 - Skip dependency vulnerability scanning
121 always:
122 - Include reproduction steps for functional bugs
123 - Document assumptions made during analysis
124
125output_format:
126 sections:
127 - Executive Summary (findings by severity, top 3 risks, overall rating)
128 - Findings Registry (YAML array, BUG-XXX schema)
129 - Fix Batches (ordered deployment groups)
130 - OWASP Scorecard (Category, Status, Count, Severity)
131 - SOLID Compliance (Principle, Violations, Files)
132 - Production Readiness Checklist (Criterion, Status, Notes)
133 - Recommended Next Steps (prioritized actions)
134
135success_criteria:
136 - All 10 OWASP categories evaluated with explicit status
137 - All 5 SOLID principles checked with file references
138 - Every Critical/High finding has a verified fix with test
139 - Findings registry parseable as valid YAML
140 - Fix batches deployable independently
141 - Production readiness checklist has zero unaddressed Critical items

برومبتات ذات صلة

Comprehensive Repository Analysis and Bug Fixing Framework

نص

A detailed framework for conducting an in-depth analysis of a repository to identify, prioritize, fix, and document bugs, security vulnerabilities, and critical issues. The prompt includes step-by-step phases for assessment, bug discovery, documentation, fixing, testing, and reporting.

H@community
0

Advanced 3D Kinematics & Character Controller

نص

Build a vector-based 3D controller for a hovering or flying entity.

H@community
0

Customer Complaint Reply System

نص

Designed for businesses and support teams that need calm, professional responses to unhappy customers without escalating tension. This prompt generates structured complaint replies that acknowledge the issue, maintain brand credibility, and move the conversation toward resolution. Built with de-escalation logic and tone control to keep outputs consistent across industries and complaint types. The final response is concise, customer-safe, and ready to send.

H@community
0

Architect a generative system that builds complex, self-similar fractal structures made entirely of light points (particles).

نص

Architect a generative system that builds complex, self-similar fractal structures made entirely of light points (particles).

H@community
0

Literature Reading Assistant

نص

Assist students in effectively reading and analyzing scholarly articles. This prompt guides users through identifying core arguments, understanding methodologies, analyzing key findings, and evaluating contributions and limitations of academic papers. Designed for structured academic analysis and synthesis to enhance comprehension and discussion skills.

H@community
0

Generating Effective Study references for AI/ML Learning Concepts

نص

—

H@community
0

Create a logic where a 3D geometric mesh

نص

Create a logic where a 3D geometric mesh (e.g., a torus or a custom GLTF model) dissolves into a cloud of thousands of interactive particles and reassembles into a different shape.

H@community
0

Procedural 3D Environment Designer

نص

I want you to act as a 3D Level Design Expert specializing in procedural content generation (PCG).

H@community
0

Reply-Focused Cold Email Builder

نص

Designed for freelancers, consultants, founders, and outbound sales teams who need concise cold emails that sound credible instead of automated. This prompt generates complete outreach emails with a subject line, natural opener, value framing, and low-friction CTA. The structure is optimized for reply likelihood rather than aggressive selling. Outputs are short, professional, and ready to send without editing.

H@community
0

Anime

نص

—

H@community
0

3D Physics Sandbox Architect

نص

want you to act as a Senior WebGL Game Architect specializing in Three.js and Cannon.js. Your goal is to design a high-performance 3D physics sandbox logic.

H@community
0

Context-Aware Email Assistant

نص

An assistant that establishes a session goal, utilizes browser context, and confirms user input when uncertain.

H@community
0

التعليقات