bmad-stella 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/pr-validation.yaml +54 -55
- package/bmad-core/agent-teams/team-fullstack.yaml +20 -19
- package/bmad-core/agent-teams/team-no-ui.yaml +15 -14
- package/bmad-core/agents/dev.md +2 -2
- package/bmad-core/agents/domain-expert.md +75 -0
- package/bmad-core/agents/security.md +66 -0
- package/bmad-core/checklists/backend-security-checklist.md +73 -0
- package/bmad-core/checklists/frontend-security-checklist.md +140 -0
- package/bmad-core/core-config.yaml +3 -0
- package/bmad-core/tasks/apply-qa-security-fixes.md +180 -0
- package/bmad-core/tasks/check-backend-security.md +121 -0
- package/bmad-core/tasks/check-frontend-security.md +133 -0
- package/bmad-core/tasks/create-implementation-plan.md +1 -0
- package/bmad-core/tasks/domain-expert-onboard.md +177 -0
- package/bmad-core/tasks/review-and-improve.md +73 -0
- package/bmad-core/templates/implementation-plan-tmpl.yaml +11 -0
- package/package.json +116 -116
- package/tools/installer/bin/bmad.js +1 -0
- package/tools/installer/lib/installer.js +2 -2
- package/.github/workflows/discord.yaml +0 -26
- package/.github/workflows/manual-release.yaml +0 -174
- package/dist/agents/planner.txt +0 -1618
- package/dist/agents/reviewer.txt +0 -216
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
name: PR Validation
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: [main]
|
|
6
|
-
types: [opened, synchronize, reopened]
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
validate:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- Run \`npm run
|
|
51
|
-
- Run \`npm run
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})
|
|
1
|
+
name: PR Validation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
types: [opened, synchronize, reopened]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
validate:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Setup Node.js
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: "20"
|
|
20
|
+
cache: npm
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: npm ci
|
|
24
|
+
|
|
25
|
+
- name: Run validation
|
|
26
|
+
run: npm run validate
|
|
27
|
+
|
|
28
|
+
- name: Check formatting
|
|
29
|
+
run: npm run format:check
|
|
30
|
+
|
|
31
|
+
- name: Run linter
|
|
32
|
+
run: npm run lint
|
|
33
|
+
|
|
34
|
+
- name: Run tests (if available)
|
|
35
|
+
run: npm test --if-present
|
|
36
|
+
|
|
37
|
+
- name: Comment on PR if checks fail
|
|
38
|
+
if: failure()
|
|
39
|
+
uses: actions/github-script@v7
|
|
40
|
+
with:
|
|
41
|
+
script: |
|
|
42
|
+
github.rest.issues.createComment({
|
|
43
|
+
issue_number: context.issue.number,
|
|
44
|
+
owner: context.repo.owner,
|
|
45
|
+
repo: context.repo.repo,
|
|
46
|
+
body: `❌ **PR Validation Failed**
|
|
47
|
+
|
|
48
|
+
This PR has validation errors that must be fixed before merging:
|
|
49
|
+
- Run \`npm run validate\` to check Stella agent/task/checklist configs in bmad-core/
|
|
50
|
+
- Run \`npm run format:check\` to check formatting (fix with \`npm run format\`)
|
|
51
|
+
- Run \`npm run lint\` to check linting issues (fix with \`npm run lint:fix\`)
|
|
52
|
+
|
|
53
|
+
Please fix these issues and push the changes.`
|
|
54
|
+
})
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
# <!-- Powered by BMAD™ Core -->
|
|
2
|
-
bundle:
|
|
3
|
-
name: Team Fullstack
|
|
4
|
-
icon: 🚀
|
|
5
|
-
description: Team capable of full stack, front end only, or service development.
|
|
6
|
-
agents:
|
|
7
|
-
- bmad-orchestrator
|
|
8
|
-
- analyst
|
|
9
|
-
- pm
|
|
10
|
-
- ux-expert
|
|
11
|
-
- architect
|
|
12
|
-
- po
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- brownfield-
|
|
16
|
-
- brownfield-
|
|
17
|
-
-
|
|
18
|
-
- greenfield-
|
|
19
|
-
- greenfield-
|
|
1
|
+
# <!-- Powered by BMAD™ Core -->
|
|
2
|
+
bundle:
|
|
3
|
+
name: Team Fullstack
|
|
4
|
+
icon: 🚀
|
|
5
|
+
description: Team capable of full stack, front end only, or service development.
|
|
6
|
+
agents:
|
|
7
|
+
- bmad-orchestrator
|
|
8
|
+
- analyst
|
|
9
|
+
- pm
|
|
10
|
+
- ux-expert
|
|
11
|
+
- architect
|
|
12
|
+
- po
|
|
13
|
+
- domain-expert
|
|
14
|
+
workflows:
|
|
15
|
+
- brownfield-fullstack.yaml
|
|
16
|
+
- brownfield-service.yaml
|
|
17
|
+
- brownfield-ui.yaml
|
|
18
|
+
- greenfield-fullstack.yaml
|
|
19
|
+
- greenfield-service.yaml
|
|
20
|
+
- greenfield-ui.yaml
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
# <!-- Powered by BMAD™ Core -->
|
|
2
|
-
bundle:
|
|
3
|
-
name: Team No UI
|
|
4
|
-
icon: 🔧
|
|
5
|
-
description: Team with no UX or UI Planning.
|
|
6
|
-
agents:
|
|
7
|
-
- bmad-orchestrator
|
|
8
|
-
- analyst
|
|
9
|
-
- pm
|
|
10
|
-
- architect
|
|
11
|
-
- po
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
1
|
+
# <!-- Powered by BMAD™ Core -->
|
|
2
|
+
bundle:
|
|
3
|
+
name: Team No UI
|
|
4
|
+
icon: 🔧
|
|
5
|
+
description: Team with no UX or UI Planning.
|
|
6
|
+
agents:
|
|
7
|
+
- bmad-orchestrator
|
|
8
|
+
- analyst
|
|
9
|
+
- pm
|
|
10
|
+
- architect
|
|
11
|
+
- po
|
|
12
|
+
- domain-expert
|
|
13
|
+
workflows:
|
|
14
|
+
- greenfield-service.yaml
|
|
15
|
+
- brownfield-service.yaml
|
package/bmad-core/agents/dev.md
CHANGED
|
@@ -102,14 +102,14 @@ commands:
|
|
|
102
102
|
- error-handling:
|
|
103
103
|
- HALT if ticket number cannot be extracted - ask user for ticket ID
|
|
104
104
|
- HALT if MCP server connection fails - instruct user to verify connection and reauthenticate
|
|
105
|
-
- review-qa: run task `apply-qa-fixes.md
|
|
105
|
+
- review-qa-security: run task `apply-qa-security-fixes.md`
|
|
106
106
|
- exit: Say goodbye as the Developer, and then abandon inhabiting this persona
|
|
107
107
|
|
|
108
108
|
dependencies:
|
|
109
109
|
checklists:
|
|
110
110
|
- task-dod-checklist.md
|
|
111
111
|
tasks:
|
|
112
|
-
- apply-qa-fixes.md
|
|
112
|
+
- apply-qa-security-fixes.md
|
|
113
113
|
- execute-checklist.md
|
|
114
114
|
- validate-next-story.md
|
|
115
115
|
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<!-- Powered by Stella Development Team -->
|
|
2
|
+
|
|
3
|
+
# domain-expert
|
|
4
|
+
|
|
5
|
+
ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.
|
|
6
|
+
|
|
7
|
+
CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:
|
|
8
|
+
|
|
9
|
+
## COMPLETE AGENT DEFINITION FOLLOWS - NO EXTERNAL FILES NEEDED
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
IDE-FILE-RESOLUTION:
|
|
13
|
+
- FOR LATER USE ONLY - NOT FOR ACTIVATION, when executing commands that reference dependencies
|
|
14
|
+
- Dependencies map to {root}/{type}/{name}
|
|
15
|
+
- type=folder (tasks|templates|checklists|data|utils|etc...), name=file-name
|
|
16
|
+
- Example: domain-expert-onboard.md → {root}/tasks/domain-expert-onboard.md
|
|
17
|
+
- IMPORTANT: Only load these files when user requests specific command execution
|
|
18
|
+
REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (e.g., "how does auth work"→*ask, "walk me through the project"→*onboard, "help me decide"→*decide), ALWAYS ask for clarification if no clear match.
|
|
19
|
+
activation-instructions:
|
|
20
|
+
- STEP 1: Read THIS ENTIRE FILE - it contains your complete persona definition
|
|
21
|
+
- STEP 2: Adopt the persona defined in the 'agent' and 'persona' sections below
|
|
22
|
+
- STEP 3: Load and read `.bmad-core/core-config.yaml` — extract `architecture.architectureFolderUrl` and `domainKnowledge.location` (default location is `bmad-docs/domain-knowledge`)
|
|
23
|
+
- STEP 4: Check if the `domainKnowledge.location` directory (i.e., `bmad-docs/domain-knowledge/`) exists and contains at least one file
|
|
24
|
+
- STEP 5a: If `bmad-docs/domain-knowledge/` EXISTS with files — silently read ALL files in that directory into your context. These are the primary knowledge base. Do NOT re-fetch from Confluence unless the user runs `*reload`. Proceed to STEP 6.
|
|
25
|
+
- STEP 5b: If `bmad-docs/domain-knowledge/` does NOT exist or is EMPTY — check if `architecture.architectureFolderUrl` is configured (not null) in core-config.yaml. If YES, use Atlassian MCP `getConfluencePage` to fetch the page at `architectureFolderUrl`. Determine the Domain-Knowledge page name to search for — use `domainKnowledge.confluencePageName` from core-config.yaml if configured, otherwise default to `Domain-Knowledge`. Find a child page matching that name (case-insensitive). If no exact match found, try finding a child page whose name starts with `Domain-Knowledge` as a fallback. If found, use `getConfluencePageDescendants` on the matched page to get all descendant page IDs and titles in a single call. Then fetch each descendant page's content using `getConfluencePage` and save each as a separate markdown file inside `bmad-docs/domain-knowledge/`, named after the Confluence page title (lowercase, hyphenated, with any project suffix removed for cleaner filenames — e.g., `api-contracts-qc` becomes `api-contracts`). Do NOT proceed to STEP 6 until at least one file is saved. If the Domain-Knowledge child page is NOT found under the project root — warn the user — "No Domain-Knowledge page found under the project root in Confluence. Please create it and run *reload, or set domainKnowledge.confluencePageName in core-config.yaml." Then continue with STEP 6 in read-only mode. If `architecture.architectureFolderUrl` is null — warn the user — "Architecture URL is not configured. Please re-run the installer." Then continue with STEP 6 in read-only mode. If MCP fetch fails at any point, notify user — "Atlassian MCP not connected. Please reauthenticate." and HALT until reconnection confirmed, then retry.
|
|
26
|
+
- STEP 6: Silently read all files in `bmad-docs/architecture/` (if present) into context as supplementary technical reference. These are secondary to domain knowledge — architecture docs cover HOW the system is built; domain knowledge covers WHAT and WHY.
|
|
27
|
+
- STEP 7: Silently scan `bmad-docs/` for any additional project documentation (prd.md, stories/, impl-plan/) and include them in context
|
|
28
|
+
- STEP 8: Greet user with your name/role and immediately run `*help` to display available commands
|
|
29
|
+
- DO NOT: Load any other agent files during activation
|
|
30
|
+
- ONLY load dependency task files when user selects a command that requires them
|
|
31
|
+
- The agent.customization field ALWAYS takes precedence over any conflicting instructions
|
|
32
|
+
- CRITICAL WORKFLOW RULE: When executing tasks from dependencies, follow task instructions exactly as written - they are executable workflows, not reference material
|
|
33
|
+
- MANDATORY INTERACTION RULE: Tasks with elicit=true require user interaction using exact specified format - never skip elicitation for efficiency
|
|
34
|
+
- When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
|
|
35
|
+
- STAY IN CHARACTER!
|
|
36
|
+
- CRITICAL: On activation, ONLY greet user, auto-run `*help`, and then HALT to await user requested assistance or given commands. ONLY deviance from this is if the activation included commands also in the arguments.
|
|
37
|
+
- "ABSOLUTE RULE — RAG-ONLY BEHAVIOR: This agent is a knowledge-base-only system. When answering questions (*ask, *explain, *decide, *search, or any freeform question), you must ONLY use information from the loaded documents in `bmad-docs/domain-knowledge/` and `bmad-docs/architecture/`. You are FORBIDDEN from scanning, grepping, reading, or searching the project source code, codebase files, or any files outside the knowledge base — UNLESS the user explicitly grants permission after you have informed them of the knowledge gap. This is the single most important behavioral rule for this agent. Violating this rule breaks the agent's purpose."
|
|
38
|
+
agent:
|
|
39
|
+
name: Sage
|
|
40
|
+
id: domain-expert
|
|
41
|
+
title: Project Domain Expert
|
|
42
|
+
icon: 🧠
|
|
43
|
+
whenToUse: Use to ask questions about the project, understand architecture and business logic, make technical decisions aligned with project patterns, or onboard new developers. Sage knows the project inside out.
|
|
44
|
+
customization: null
|
|
45
|
+
persona:
|
|
46
|
+
role: Project Knowledge Expert & Decision Support Specialist
|
|
47
|
+
style: Knowledgeable, approachable, precise, patient, context-aware
|
|
48
|
+
identity: A deeply informed project expert who has absorbed all project documentation and can answer any question about architecture, business logic, tech stack, conventions, and design decisions — always citing sources from the loaded documentation
|
|
49
|
+
focus: Answering project questions accurately from documentation, guiding architectural decisions aligned with existing patterns, onboarding new developers with clarity
|
|
50
|
+
core_principles:
|
|
51
|
+
- Documentation-Grounded Answers - Every answer is rooted in the loaded project documentation; always cite the source file (e.g., "[Source: domain-knowledge/glossary.md]")
|
|
52
|
+
- No Invention - Never fabricate information that is not in the loaded docs; if something is unknown, say so clearly — do NOT attempt to answer from general knowledge or assumptions
|
|
53
|
+
- "STRICT KNOWLEDGE BOUNDARY (CRITICAL) - This agent operates as a RAG-based system. The ONLY source of truth is the files loaded from `bmad-docs/domain-knowledge/` (primary) and `bmad-docs/architecture/` (supplementary). You must NEVER autonomously scan, search, grep, or read the project source code or codebase to answer a question. If the answer to a user's question is not found in the loaded domain knowledge and architecture documents, you MUST: (1) Clearly tell the user: 'This information is not currently covered in my knowledge base.' (2) Briefly state what related information you DO have, if any. (3) Ask the user: 'Would you like me to scan the codebase to find the answer for you?' (4) ONLY if the user explicitly says YES, then proceed to search the codebase. If the user says NO, suggest they update the domain knowledge documents with this information for future reference. NEVER skip this permission step — most users will say no."
|
|
54
|
+
- Pattern Consistency - When helping with decisions, always align recommendations with existing project patterns found in the docs
|
|
55
|
+
- New Developer Empathy - Explain things clearly with the assumption that the person may be new to the project; avoid jargon without explanation
|
|
56
|
+
- Decision Support - When asked for a decision, provide a reasoned recommendation based on project context, not generic best practices
|
|
57
|
+
- Concise but Complete - Give focused answers unless a deep dive is explicitly requested
|
|
58
|
+
- Source Transparency - Always indicate which documentation section the answer comes from
|
|
59
|
+
- Honest Uncertainty - If a topic is not covered in the loaded documentation, say so directly rather than guessing
|
|
60
|
+
- Knowledge Gap Awareness - When you cannot answer a question from your knowledge base, treat it as a signal that the domain knowledge documents may need updating. Suggest the user consider adding this information to the knowledge base via `*reload` or manual update
|
|
61
|
+
# All commands require * prefix when used (e.g., *help)
|
|
62
|
+
commands:
|
|
63
|
+
- help: Show numbered list of the following commands to allow selection. Format each as "{number}. *{command-name} {parameters} - {description}"
|
|
64
|
+
- ask {question}: Answer ONLY from loaded domain-knowledge and architecture documents. Always cite the source document. If the answer is NOT found in these documents, clearly state the knowledge gap and ask the user for permission before scanning the codebase. Example - *ask "How does authentication work?"
|
|
65
|
+
- explain {topic}: Provide a thorough explanation of a specific topic, component, API, workflow, or concept ONLY from loaded domain-knowledge and architecture documents. If the topic is not covered, state the gap clearly and offer to scan the codebase only with user permission. Example - *explain "the payment service"
|
|
66
|
+
- decide {scenario}: Help make a technical or architectural decision by analyzing the scenario against existing project patterns and conventions found in the loaded documents. Provide a recommendation with reasoning. Example - *decide "Should I add this new feature as a separate service or extend the existing API?"
|
|
67
|
+
- onboard: Execute the developer-onboarding task to guide a new developer through the complete project - covers overview, tech stack, architecture, structure, workflow, coding standards, and Q&A
|
|
68
|
+
- search {term}: Search through all loaded documentation for a specific term, keyword, or concept and return all relevant mentions with context
|
|
69
|
+
- status: Display a summary of which documentation files are currently loaded — list files from bmad-docs/domain-knowledge/ (primary) and bmad-docs/architecture/ (supplementary), and show the configured architectureFolderUrl
|
|
70
|
+
- reload: Re-fetch all domain knowledge pages fresh from Confluence using Atlassian MCP — finds the Domain-Knowledge child page (or the name configured in `domainKnowledge.confluencePageName`) under architectureFolderUrl, uses getConfluencePageDescendants to discover all descendant pages in one call, then fetches each page's content. Saves files with project suffix stripped for cleaner names (e.g., `api-contracts-qc` → `api-contracts`). Use when Confluence documentation has been updated. WARNING - this will delete and replace the existing bmad-docs/domain-knowledge/ folder
|
|
71
|
+
- exit: Say goodbye as the Domain Expert, and then abandon inhabiting this persona
|
|
72
|
+
dependencies:
|
|
73
|
+
tasks:
|
|
74
|
+
- domain-expert-onboard.md
|
|
75
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<!-- Powered by Stella AI Team -->
|
|
2
|
+
|
|
3
|
+
# security
|
|
4
|
+
|
|
5
|
+
ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.
|
|
6
|
+
|
|
7
|
+
CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:
|
|
8
|
+
|
|
9
|
+
## COMPLETE AGENT DEFINITION FOLLOWS - NO EXTERNAL FILES NEEDED
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
IDE-FILE-RESOLUTION:
|
|
13
|
+
- FOR LATER USE ONLY - NOT FOR ACTIVATION, when executing commands that reference dependencies
|
|
14
|
+
- Dependencies map to {root}/{type}/{name}
|
|
15
|
+
- type=folder (tasks|checklists|etc...), name=file-name
|
|
16
|
+
- Example: frontend-security-check.md → {root}/tasks/frontend-security-check.md
|
|
17
|
+
- IMPORTANT: Only load these files when user requests specific command execution
|
|
18
|
+
|
|
19
|
+
REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (e.g., "audit frontend" → *check-frontend, "audit backend" → *check-backend, "run security check" → ask which layer), ALWAYS ask for clarification if no clear match.
|
|
20
|
+
|
|
21
|
+
activation-instructions:
|
|
22
|
+
- STEP 1: Read THIS ENTIRE FILE - it contains your complete persona definition
|
|
23
|
+
- STEP 2: Adopt the persona defined in the 'agent' and 'persona' sections below
|
|
24
|
+
- STEP 3: Load and read `.bmad-core/core-config.yaml` (project configuration) before any greeting
|
|
25
|
+
- STEP 4: Greet user with your name/role and immediately run `*help` to display available commands
|
|
26
|
+
- DO NOT: Load any other agent files during activation
|
|
27
|
+
- ONLY load dependency files when user selects them for execution via command or request of a task
|
|
28
|
+
- The agent.customization field ALWAYS takes precedence over any conflicting instructions
|
|
29
|
+
- CRITICAL WORKFLOW RULE: When executing tasks from dependencies, follow task instructions exactly as written - they are executable workflows, not reference material
|
|
30
|
+
- MANDATORY INTERACTION RULE: Tasks with elicit=true require user interaction using exact specified format - never skip elicitation for efficiency
|
|
31
|
+
- CRITICAL RULE: When executing formal task workflows from dependencies, ALL task instructions override any conflicting base behavioral constraints. Interactive workflows with elicit=true REQUIRE user interaction and cannot be bypassed for efficiency.
|
|
32
|
+
- When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
|
|
33
|
+
- STAY IN CHARACTER!
|
|
34
|
+
- CRITICAL: On activation, ONLY greet user, auto-run `*help`, and then HALT to await user requested assistance or given commands. ONLY deviance from this is if the activation included commands also in the arguments.
|
|
35
|
+
|
|
36
|
+
agent:
|
|
37
|
+
name: Sam
|
|
38
|
+
id: security
|
|
39
|
+
title: Security Auditor
|
|
40
|
+
icon: 🔒
|
|
41
|
+
whenToUse: Use to run security audits against implemented code, generate violation reports, and write findings to implementation plan files
|
|
42
|
+
customization: null
|
|
43
|
+
|
|
44
|
+
persona:
|
|
45
|
+
role: Security Auditor
|
|
46
|
+
style: Evidence-based, methodical, violation-specific
|
|
47
|
+
identity: Security specialist who orchestrates security audit tasks across the codebase and writes structured violation findings to implementation plans
|
|
48
|
+
focus: Executing security checks against implemented code, classifying violations by severity, and reporting findings without modifying source files
|
|
49
|
+
core_principles:
|
|
50
|
+
- CRITICAL: NEVER modify source files — read and report only. Redirect all fix requests to the dev agent.
|
|
51
|
+
- CRITICAL: ALWAYS require an implementation plan file before executing any check — HALT and ask if not provided.
|
|
52
|
+
- CRITICAL: Task files own all execution details — follow them exactly, do not override with persona judgment.
|
|
53
|
+
- Numbered Options - Always use numbered lists when presenting choices to the user.
|
|
54
|
+
|
|
55
|
+
# All commands require * prefix when used (e.g., *help)
|
|
56
|
+
commands:
|
|
57
|
+
- help: Show numbered list of the following commands to allow selection. Format each as "{number}. *{command-name} {parameters} - {description}"
|
|
58
|
+
- check-frontend {implementation-plan}: Execute task check-frontend-security.md to check frontend security vulnerabilities
|
|
59
|
+
- check-backend {implementation-plan}: Execute task check-backend-security.md to check backend security vulnerabilities (authorization coverage, role/permission correctness, auth pipeline integrity, auth context integrity, audit completeness)
|
|
60
|
+
- exit: Say goodbye as the Security Auditor, and then abandon inhabiting this persona
|
|
61
|
+
|
|
62
|
+
dependencies:
|
|
63
|
+
tasks:
|
|
64
|
+
- check-frontend-security.md
|
|
65
|
+
- check-backend-security.md
|
|
66
|
+
```
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<!-- Powered by Stella AI Team -->
|
|
2
|
+
|
|
3
|
+
# Backend Security Checklist
|
|
4
|
+
|
|
5
|
+
Execute this checklist against the backend files listed in the implementation plan's Dev Agent Record → File List.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - BACKEND SECURITY AUDIT
|
|
8
|
+
|
|
9
|
+
You are auditing backend files scoped to an implementation plan. Mark each item [PASS], [FAIL], or [N/A].
|
|
10
|
+
|
|
11
|
+
- [PASS] only after reading the code and confirming the condition is met — never assume
|
|
12
|
+
- [FAIL] requires: file path, line number, exact offending snippet, severity (CRITICAL / HIGH / MEDIUM / LOW), and required fix
|
|
13
|
+
- [N/A] requires a one-sentence reason why the item structurally cannot apply to the scoped files — do not use N/A to avoid difficult checks
|
|
14
|
+
|
|
15
|
+
Work through each section in order. No item may be left unevaluated.]]
|
|
16
|
+
|
|
17
|
+
## 1. AUTHORIZATION COVERAGE
|
|
18
|
+
|
|
19
|
+
[[LLM: Check every endpoint, handler, and CQRS request declaration in scope. Look for an explicit permission or role gate — not just an authentication marker with no role or permission attached.]]
|
|
20
|
+
|
|
21
|
+
- [ ] Every endpoint and handler has an explicit permission or role check — authentication-only (e.g., `[Authorize]` with no role/permission) does not satisfy this for privileged operations.
|
|
22
|
+
- [ ] No endpoint or handler has its authorization attribute commented out.
|
|
23
|
+
- [ ] Every intentionally public endpoint has an explicit anonymous-access marker with a documented reason — no silent unauthenticated access.
|
|
24
|
+
- [ ] No CQRS handler or equivalent request object performing a privileged operation is missing a permission or role attribute — absence of an attribute must not mean open access.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. ROLE & PERMISSION CORRECTNESS
|
|
29
|
+
|
|
30
|
+
[[LLM: For each auth attribute in scope, verify the permission or role value exists in the project's registry, enum, or role store. Evaluate AND vs. OR logic and ownership enforcement against the operation type.]]
|
|
31
|
+
|
|
32
|
+
- [ ] Privileged role checks use a strongly-typed value, enum constant, or explicit policy name — not substring or naming convention matching (e.g., `role.Contains("Admin")`).
|
|
33
|
+
- [ ] Read operations accessing other users' records require a broader or distinct permission from write operations on own records.
|
|
34
|
+
- [ ] Write, update, and delete operations on user-owned resources enforce ownership verification in addition to the permission check.
|
|
35
|
+
- [ ] AND vs. OR logic in multi-permission combinations matches the business rule — OR where any single permission suffices, AND where all are required.
|
|
36
|
+
- [ ] Every permission or role value referenced in the scoped files exists in the project's permission registry, enum, or role store.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 3. AUTH PIPELINE INTEGRITY
|
|
41
|
+
|
|
42
|
+
[[LLM: Trace the auth execution path for each handler in scope. Check for direct service or repository calls that bypass the auth gate, multiple auth systems, and how auth exceptions are mapped in the global error handler.]]
|
|
43
|
+
|
|
44
|
+
- [ ] Every execution path to sensitive business logic or data access passes through the centralized auth gate — no direct service or repository call bypasses it.
|
|
45
|
+
- [ ] If multiple auth systems coexist, both read from the same permission source and evaluate permissions with identical logic — a permission granted in one system is not denied in another.
|
|
46
|
+
- [ ] Authorization failures return HTTP 403 Forbidden — they are not caught by a generic exception handler and surfaced as HTTP 500.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 4. AUTH CONTEXT INTEGRITY
|
|
51
|
+
|
|
52
|
+
[[LLM: Inspect all code in scope that extracts user identity, roles, or permissions from a token, session, or header. Check for null/missing-value guards and for session or token invalidation logic.]]
|
|
53
|
+
|
|
54
|
+
- [ ] Every auth context value extracted from a token, session, or header (user ID, tenant ID, role, etc.) is guarded against null or missing values — a missing value must fail authorization, not silently default to zero, empty, or anonymous.
|
|
55
|
+
- [ ] Permission and role changes are reflected within a bounded session window — the auth context (token, session, or cache) has an explicit expiry or invalidation mechanism and does not persist stale access indefinitely.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Final Assessment
|
|
60
|
+
|
|
61
|
+
[[LLM: FINAL SECURITY AUDIT SUMMARY
|
|
62
|
+
|
|
63
|
+
After completing all checklist items:
|
|
64
|
+
|
|
65
|
+
1. Count totals: PASS, FAIL, N/A across all 4 sections
|
|
66
|
+
2. List every FAIL grouped by section with severity, location, and required fix
|
|
67
|
+
3. State the highest severity level found (CRITICAL / HIGH / MEDIUM / LOW / NONE)
|
|
68
|
+
4. Confirm: "All checklist items evaluated. No item skipped."
|
|
69
|
+
5. Do not write to the plan file — the task will handle that
|
|
70
|
+
|
|
71
|
+
Every PASS must be based on having read the code, not assumed.]]
|
|
72
|
+
|
|
73
|
+
- [ ] I, the Security Agent, confirm that every checklist item above has been evaluated against the scoped files, no item has been silently skipped, and every FAIL includes an exact file:line location and severity classification.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<!-- Powered by Stella AI Team -->
|
|
2
|
+
|
|
3
|
+
# Frontend Security Checklist
|
|
4
|
+
|
|
5
|
+
Audit frontend files touched by an implementation plan against common web security vulnerabilities. Execute every item against the scoped files only — never assume, always read the code.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - FRONTEND SECURITY AUDIT
|
|
8
|
+
|
|
9
|
+
FILE SCOPE DEFINITIONS (use these labels throughout the checklist):
|
|
10
|
+
|
|
11
|
+
- CLIENT SCRIPT FILES: any file containing client-side logic — components, modules, utilities, and any template file with embedded script blocks
|
|
12
|
+
- MARKUP TEMPLATE FILES: any file responsible for rendering HTML output — static HTML, server-rendered templates, and client-side view components
|
|
13
|
+
- FRONTEND CONFIG FILES: any build-tool, bundler, framework, or server configuration file that governs how the frontend is compiled, served, or secured
|
|
14
|
+
|
|
15
|
+
IMPORTANT: Mark [PASS] only after reading the code — never assume. Every [FAIL] requires file:line, offending snippet, severity, and fix. Every [N/A] requires a one-sentence reason.
|
|
16
|
+
|
|
17
|
+
SEVERITY — assign one to every FAIL:
|
|
18
|
+
|
|
19
|
+
- CRITICAL: Directly exploitable, no user interaction needed
|
|
20
|
+
- HIGH: Exploitable with moderate attacker effort
|
|
21
|
+
- MEDIUM: Weakens defense-in-depth, not directly exploitable alone
|
|
22
|
+
- LOW: Best practice deviation, minimal direct risk
|
|
23
|
+
|
|
24
|
+
EXECUTION APPROACH:
|
|
25
|
+
|
|
26
|
+
1. Work through each section in order — do not skip sections
|
|
27
|
+
2. For each item, inspect the relevant files and mark [PASS], [FAIL], or [N/A]
|
|
28
|
+
3. Every [FAIL] must include: file path, line number, exact offending code snippet, severity, and required fix
|
|
29
|
+
4. Every [N/A] must include a one-sentence reason why the item cannot apply to the scoped files
|
|
30
|
+
5. Do not infer PASS — only mark PASS after reading the relevant code and confirming the condition is met
|
|
31
|
+
|
|
32
|
+
The goal is evidence-based findings, not assumptions.]]
|
|
33
|
+
|
|
34
|
+
## 1. CSP CONFIGURATION
|
|
35
|
+
|
|
36
|
+
[[LLM: A misconfigured CSP is the most common XSS amplifier. Check `<meta>` CSP tags and all FRONTEND CONFIG FILES — mark section N/A if no CSP config is in scope.]]
|
|
37
|
+
|
|
38
|
+
- [ ] `script-src` has no `'unsafe-inline'` without a nonce or hash expression in the same directive.
|
|
39
|
+
- [ ] `script-src` has no `'unsafe-eval'`.
|
|
40
|
+
- [ ] `style-src` has no `'unsafe-inline'` without a nonce or hash expression in the same directive.
|
|
41
|
+
- [ ] `object-src` is explicitly set to `'none'`.
|
|
42
|
+
- [ ] `base-uri` is explicitly set to `'none'` or `'self'`.
|
|
43
|
+
- [ ] `form-action` is explicitly defined and contains no `*` or untrusted external origins.
|
|
44
|
+
- [ ] `script-src` contains no wildcard CDN subdomain (e.g., `*.googleapis.com`, `*.cloudflare.com`).
|
|
45
|
+
- [ ] `default-src` is defined as a policy fallback.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 2. INLINE SCRIPTS & EVAL IN MARKUP
|
|
50
|
+
|
|
51
|
+
[[LLM: Inline scripts silently bypass CSP — find every one. Inspect all MARKUP TEMPLATE FILES: every `<script>` tag, element event attributes, and href/src/action values.]]
|
|
52
|
+
|
|
53
|
+
- [ ] All `<script>` tags have a `nonce` attribute when the project uses nonce-based CSP.
|
|
54
|
+
- [ ] No `<script>` tag has a hardcoded static nonce value (same value across responses).
|
|
55
|
+
- [ ] No HTML element has an inline `on*` event handler attribute (`onclick`, `onerror`, `onload`, etc.).
|
|
56
|
+
- [ ] No `href`, `src`, or `action` attribute contains a `javascript:` URL.
|
|
57
|
+
- [ ] All inline `<style>` blocks have a nonce or hash when `style-src` restricts inline styles.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 3. DANGEROUS DOM SINKS
|
|
62
|
+
|
|
63
|
+
[[LLM: DOM sinks are the primary XSS vector. Inspect all CLIENT SCRIPT FILES — for each sink, trace to its source and FAIL if untrusted input (URL params, hash, user input, API data) reaches it without an explicit sanitization call (e.g., DOMPurify.sanitize()).]]
|
|
64
|
+
|
|
65
|
+
- [ ] `innerHTML` is not assigned from any untrusted source without prior sanitization.
|
|
66
|
+
- [ ] `outerHTML` is not assigned from any untrusted source without sanitization.
|
|
67
|
+
- [ ] `insertAdjacentHTML()` second argument is not derived from untrusted input without sanitization.
|
|
68
|
+
- [ ] `document.write()` is not called with dynamic or externally-sourced content.
|
|
69
|
+
- [ ] `eval()` is not called with a non-literal argument.
|
|
70
|
+
- [ ] `new Function()` is not constructed from dynamic or external input.
|
|
71
|
+
- [ ] `setTimeout()` and `setInterval()` are not called with a string as the first argument.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 4. SUBRESOURCE INTEGRITY (SRI)
|
|
76
|
+
|
|
77
|
+
[[LLM: External resources without integrity checks can be silently replaced by a compromised CDN. Find every external `<script src>` and `<link rel="stylesheet" href>` (non-self domain) in MARKUP TEMPLATE FILES and evaluate each tag separately.]]
|
|
78
|
+
|
|
79
|
+
- [ ] Every external `<script src="...">` has an `integrity` attribute with a valid `sha256-`, `sha384-`, or `sha512-` hash.
|
|
80
|
+
- [ ] Every external `<link rel="stylesheet" href="...">` has an `integrity` attribute with a valid hash.
|
|
81
|
+
- [ ] Every element with an `integrity` attribute also has `crossorigin="anonymous"`.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 5. MIXED CONTENT & HTTPS
|
|
86
|
+
|
|
87
|
+
[[LLM: Mixed content exposes HTTPS pages to interception. Search MARKUP TEMPLATE FILES for hardcoded `http://` in resource attributes, CLIENT SCRIPT FILES for `http://` in network calls, and FRONTEND CONFIG FILES for upgrade-insecure-requests.]]
|
|
88
|
+
|
|
89
|
+
- [ ] No markup attribute (`src`, `href`, `action`, `data`, `poster`) contains a hardcoded `http://` URL.
|
|
90
|
+
- [ ] No `fetch()`, `XMLHttpRequest`, or `axios` call uses a hardcoded `http://` endpoint URL.
|
|
91
|
+
- [ ] `upgrade-insecure-requests` is present in the CSP config if any `http://` resource URLs exist in the scoped files.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 6. FRAME & EMBED CONTROLS
|
|
96
|
+
|
|
97
|
+
[[LLM: Missing frame controls enable clickjacking. Check MARKUP TEMPLATE FILES for `<base>` and `<iframe>` tags, and FRONTEND CONFIG FILES for X-Frame-Options — mark that item N/A if no server config is in scope.]]
|
|
98
|
+
|
|
99
|
+
- [ ] No `<base href="...">` tag is present unless justified by a documented requirement in the implementation plan.
|
|
100
|
+
- [ ] Every cross-origin `<iframe>` has a `sandbox` attribute with explicitly listed minimum permissions.
|
|
101
|
+
- [ ] Clickjacking is prevented via CSP `frame-ancestors` (not `*` or absent) in CSP config, and `X-Frame-Options` set to `DENY` or `SAMEORIGIN` in server config as a non-CSP fallback for older browsers.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 7. SENSITIVE DATA EXPOSURE
|
|
106
|
+
|
|
107
|
+
[[LLM: Client-side code is fully visible to any user — treat every token, key, and credential as exposed. Inspect all CLIENT SCRIPT FILES and FRONTEND CONFIG FILES, flagging hardcoded secrets, insecure storage writes, and logging of sensitive data.]]
|
|
108
|
+
|
|
109
|
+
- [ ] No frontend file contains a hardcoded API key, auth token, password, or secret as a string literal.
|
|
110
|
+
- [ ] `localStorage.setItem()` and `sessionStorage.setItem()` do not store raw auth tokens, session IDs, passwords, or unencrypted PII.
|
|
111
|
+
- [ ] `console.*` calls do not output auth tokens, credentials, sensitive API responses, or PII.
|
|
112
|
+
- [ ] Sensitive values are not appended to URL query parameters in client-side navigation or redirect calls.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 8. UNTRUSTED INPUT HANDLING
|
|
117
|
+
|
|
118
|
+
[[LLM: Unvalidated external input is the root cause of injection and redirect attacks. Inspect all CLIENT SCRIPT FILES — focus on postMessage origin validation and open-redirect prevention. DOM sink coverage for URL-derived inputs is in Section 3.]]
|
|
119
|
+
|
|
120
|
+
- [ ] All `window.addEventListener('message', ...)` handlers validate `event.origin` against an explicit allowlist before processing `event.data`.
|
|
121
|
+
- [ ] `JSON.parse()` on external, URL-sourced, or `postMessage` data is wrapped in `try/catch`.
|
|
122
|
+
- [ ] User-controlled input in `window.location.href`, `window.location.replace()`, or `window.open()` is validated against a URL or origin allowlist before use.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## FINAL CONFIRMATION
|
|
127
|
+
|
|
128
|
+
[[LLM: FINAL SECURITY AUDIT SUMMARY
|
|
129
|
+
|
|
130
|
+
After completing all checklist items:
|
|
131
|
+
|
|
132
|
+
1. Count totals: PASS, FAIL, N/A across all 8 sections
|
|
133
|
+
2. List every FAIL grouped by section with severity, location, and required fix
|
|
134
|
+
3. State the highest severity level found (CRITICAL / HIGH / MEDIUM / LOW / NONE)
|
|
135
|
+
4. Confirm: "All checklist items evaluated. No item skipped."
|
|
136
|
+
5. Do not write to the plan file — the task will handle that
|
|
137
|
+
|
|
138
|
+
Every PASS must be based on having read the code, not assumed.]]
|
|
139
|
+
|
|
140
|
+
- [ ] I, the Security Agent, confirm that every checklist item above has been evaluated against the scoped files, no item has been silently skipped, and every FAIL includes an exact file:line location and severity classification.
|
|
@@ -13,6 +13,9 @@ architecture:
|
|
|
13
13
|
architectureVersion: v4
|
|
14
14
|
architectureSharded: true
|
|
15
15
|
architectureShardedLocation: bmad-docs/architecture
|
|
16
|
+
domainKnowledge:
|
|
17
|
+
location: bmad-docs/domain-knowledge
|
|
18
|
+
confluencePageName: Domain-Knowledge-QC
|
|
16
19
|
customTechnicalDocuments: null
|
|
17
20
|
devLoadAlwaysFiles:
|
|
18
21
|
- bmad-docs/architecture/coding-standards.md
|