Skip to content

STRIDE enforcement for first step of security workflow#69

Merged
shashank-factory merged 1 commit intodevfrom
ssharma/security-review-plugin-3
Mar 31, 2026
Merged

STRIDE enforcement for first step of security workflow#69
shashank-factory merged 1 commit intodevfrom
ssharma/security-review-plugin-3

Conversation

@shashank-factory
Copy link
Copy Markdown
Contributor

@shashank-factory shashank-factory commented Mar 31, 2026

Summary

Enhances the security workflow's first step (Threat Model Check) by replacing the brief fallback instruction with detailed STRIDE-based threat-modeling guidance when .factory/threat-model.md is missing from the repository.

Changes

  • Expanded missing-threat-model path: When no threat model file exists, the prompt now instructs Droid to build a full STRIDE threat model in-session before proceeding with the security scan. The instructions cover:
    1. Scanning the repository structure for key components
    2. Identifying trust boundaries
    3. Mapping data flows across those boundaries
    4. Enumerating attack surfaces for each STRIDE category (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege)
    5. Using the generated analysis as context for subsequent scan steps
  • Simplified existing-file path: When the threat model file already exists, the prompt now simply reads and uses it — the previous staleness check (older than 90 days) has been removed.
  • Silent generation: Added instruction to not mention the missing threat model file in the summary comment, keeping the output clean.

Implementation Details

All changes are in the security review prompt template (src/create-prompt/templates/security-review-prompt.ts), specifically the "Step 1: Threat Model Check" section. No runtime logic or API changes — this is purely a prompt content update.

Testing

[To be filled by author]

Related Issues

[To be filled by author]

@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid bot commented Mar 31, 2026

Droid finished @shashank-factory's task —— View job


@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid bot commented Mar 31, 2026

Droid finished @shashank-factory's task —— View job


Copy link
Copy Markdown
Contributor

@factory-droid factory-droid bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR updates the security review prompt to enforce STRIDE-style threat modeling when a threat model file is missing. The change is purely in prompt template text and does not introduce code-level correctness or security issues.

@shashank-factory shashank-factory merged commit 158d137 into dev Mar 31, 2026
5 checks passed
@shashank-factory shashank-factory deleted the ssharma/security-review-plugin-3 branch March 31, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants