Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(threat-modeler): add genAI threat modeling action #117

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vsofronievk
Copy link

A supporting automated threat modeling action that allows teams to develop threat model using ChatGPT based on mermaid.js DFDs and an application description.

@vsofronievk vsofronievk requested review from a team as code owners April 26, 2024 13:23
@CLAassistant
Copy link

CLAassistant commented Apr 26, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

github-actions bot commented Apr 26, 2024

Luacheck Report

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
4 tests ±0  4 ✅ ±0  0 💤 ±0  0 ❌ ±0 
8 runs  ±0  8 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a941a0f. ± Comparison against base commit a98be01.

♻️ This comment has been updated with latest results.

cjbischoffkg
cjbischoffkg previously approved these changes Apr 26, 2024
@saisatishkarra
Copy link
Collaborator

@vsofronievk can you sign the CLA here

security-actions/threat-modeler/action.yml Outdated Show resolved Hide resolved
security-actions/threat-modeler/action.yml Outdated Show resolved Hide resolved
Comment on lines +1 to +37
name: Threat Model

on:
pull_request: {}
push:
branches:
- master
- main
workflow_dispatch: {}

jobs:
threat-modeler:
name: ChatGPT Threat Model
runs-on: ubuntu-latest

if: (github.actor != 'dependabot[bot]')

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run Threat-Modeler
id: threat-modeler
uses: Kong/public-shared-actions@91c2c6a12cc7baf69aea166f3ca9b3528ed018c9
with:
docs-directory: 'docs'
application-description: 'application_description'
dry-run: 'false'
api-key: ${{ secrets.OPENAI_API_KEY}}

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: threat-model
github-token: ${{ secrets.GITHUB_TOKEN }}


Copy link
Collaborator

Choose a reason for hiding this comment

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

  • Move usage example to ./security-actions/threat-modeler/readme.md - Something like this
  • Add docs/ and make a.github/workflows/threat-modeler-consumer.yml to public-shared-actions to run as a test to avoid any breaking changes in downstream repos on releases / updates to this action.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@vsofronievk can you address the Move usage example to ./security-actions/threat-modeler/readme.md - Something like [this](https://github.com/Kong/public-shared-actions/tree/main/security-actions/sca#usage-examples) so it can be run on this repo as a test workflow may be in dry-run mode.

with:
name: threat-model
path: threat-modeler/threat-modeler/threat_model.json

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this file be the main entrypoint instead of ./secuity-actions/threat-modeler/action.yml referencing this file internally? Is this auto-generated?

"devDependencies": {
"@types/node": "^20.11.28"
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add security-actions/threat-modeler to .github/dependabot.yml - something like [this](https://github.com/Kong/public-shared-actions/blob/main/.github/dependabot.yml#L13- L19) with nodejs package manager for auto-updates.

security-actions/threat-modeler/threat-modeler/src/main.ts Outdated Show resolved Hide resolved
@vsofronievk vsofronievk force-pushed the threat-modeler branch 2 times, most recently from 0e57185 to 5ae1cdc Compare May 16, 2024 11:02
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.

4 participants