-
Notifications
You must be signed in to change notification settings - Fork 4
Add advisory support #54
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
base: main
Are you sure you want to change the base?
Changes from all commits
a618b14
26f6d3d
ef5f389
7276a2d
250186f
f1ba721
9ec009c
35e41ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,4 +5,4 @@ | |||||
| # https://stackoverflow.com/a/53122736 | ||||||
| __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||||||
|
|
||||||
| ${__dir}/../run_in_docker.sh ${__dir}/run_audit.sh "$1" | ||||||
| ${__dir}/../run_in_docker.sh ${__dir}/run_audit.sh "$@" | ||||||
|
||||||
| ${__dir}/../run_in_docker.sh ${__dir}/run_audit.sh "$@" | |
| "${__dir}/../run_in_docker.sh" "${__dir}/run_audit.sh" "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # SPDX-FileCopyrightText: GitHub, Inc. | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| seclab-taskflow-agent: | ||
| filetype: prompt | ||
| version: "1.0" | ||
| prompt: | | ||
| ## Known Security Advisories for this Repository | ||
|
|
||
| Fetch the security advisories for {{ globals.repo }} from memcache (stored under the key 'security_advisories_{{ globals.repo }}'). If the value in the memcache is null or an error message, clearly state that no advisories are available and skip advisory analysis. Otherwise, state how many advisories were found. | ||
| Review these advisories and consider them when identifying security risks. If you identify code that is similar to a known advisory pattern, highlight that connection. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ model_config: seclab_taskflows.configs.model_config | |
|
|
||
| globals: | ||
| repo: | ||
| use_advisory: | ||
| # Taskflow to audit some potential issues. | ||
| taskflow: | ||
| - task: | ||
|
|
@@ -29,20 +30,24 @@ taskflow: | |
| - seclab_taskflows.personalities.web_application_security_expert | ||
| model: code_analysis | ||
| user_prompt: | | ||
| The issue is in repo {{ result.repo }} with id {{ result.issue_id }}. The component is under the directory | ||
| The issue is in repo {{ result.repo }} with id {{ result.issue_id }}. The component is under the directory | ||
| {{ result.location }} with component_id {{ result.component_id }}. The notes of the component is: | ||
|
|
||
| {{ result.component_notes }} | ||
|
|
||
| You should use this to understand the intended purpose of the component and take it into account when | ||
| You should use this to understand the intended purpose of the component and take it into account when | ||
| you audit the issue. | ||
|
|
||
| The type of the issue is {{ result.issue_type }} and here is the notes of the issue: | ||
|
|
||
| {{ result.issue_notes }} | ||
|
|
||
| {% if globals.use_advisory == 'true' %} | ||
| {% include 'seclab_taskflows.prompts.audit.known_security_advisories' %} | ||
| {% endif %} | ||
|
|
||
| {% include 'seclab_taskflows.prompts.audit.audit_issue' %} | ||
|
Comment on lines
46
to
49
|
||
| toolboxes: | ||
| - seclab_taskflows.toolboxes.repo_context | ||
| - seclab_taskflows.toolboxes.local_file_viewer | ||
|
|
||
| - seclab_taskflow_agent.toolboxes.memcache | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||
| # SPDX-FileCopyrightText: GitHub, Inc. | ||||||
| # SPDX-License-Identifier: MIT | ||||||
|
|
||||||
| seclab-taskflow-agent: | ||||||
| filetype: taskflow | ||||||
| version: "1.0" | ||||||
|
|
||||||
| model_config: seclab_taskflows.configs.model_config | ||||||
|
|
||||||
| globals: | ||||||
| repo: | ||||||
|
|
||||||
| # Example taskflow to fetch and review security advisories for a repository | ||||||
| taskflow: | ||||||
| - task: | ||||||
| must_complete: true | ||||||
| exclude_from_context: false | ||||||
| agents: | ||||||
| - seclab_taskflow_agent.personalities.assistant | ||||||
| model: general_tasks | ||||||
| user_prompt: | | ||||||
| Fetch all GitHub Security Advisories (GHSAs) for the repo {{ globals.repo }}. | ||||||
|
|
||||||
| If an error occurs during fetching, store the error message in memcache under the key 'security_advisories_{{ globals.repo }}'. | ||||||
| Ensure the error message starts with "Error:" followed by a description of the error. | ||||||
|
|
||||||
| If fetching is successful, store the list of advisories in memcache under the key 'security_advisories_{{ globals.repo }}'. | ||||||
|
|
||||||
| If one ore more advisories are found, provide a summary of the findings including: | ||||||
|
||||||
| If one ore more advisories are found, provide a summary of the findings including: | |
| If one or more advisories are found, provide a summary of the findings including: |
Copilot
AI
Feb 17, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch_security_advisories is only describing fetching advisories + writing to memcache, but the task grants local_file_viewer and gh_file_viewer toolboxes as well. If they aren’t needed for this flow, removing them reduces tool surface area and avoids unnecessary tool calls/context overhead.
| - seclab_taskflows.toolboxes.local_file_viewer | |
| - seclab_taskflows.toolboxes.gh_file_viewer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unknown option handling prints to stdout and doesn’t show usage/help. Prefer writing option parse errors to stderr and including the usage string (or supporting
--help) to make failures easier to diagnose in scripts/CI.