Skip to content

Commit 9ec009c

Browse files
committed
Make advisory prompt conditional via use_advisory global
1 parent f1ba721 commit 9ec009c

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/audit/run_audit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ if [ "$USE_ADVISORY" = true ]; then
3333
python -m seclab_taskflow_agent -t seclab_taskflows.taskflows.audit.fetch_security_advisories -g repo="$1"
3434
fi
3535

36-
python -m seclab_taskflow_agent -t seclab_taskflows.taskflows.audit.classify_application_local -g repo="$1"
37-
python -m seclab_taskflow_agent -t seclab_taskflows.taskflows.audit.audit_issue_local_iter -g repo="$1"
36+
python -m seclab_taskflow_agent -t seclab_taskflows.taskflows.audit.classify_application_local -g repo="$1" -g use_advisory="$USE_ADVISORY"
37+
python -m seclab_taskflow_agent -t seclab_taskflows.taskflows.audit.audit_issue_local_iter -g repo="$1" -g use_advisory="$USE_ADVISORY"
3838

3939
set +e
4040

src/seclab_taskflows/taskflows/audit/audit_issue_local_iter.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ model_config: seclab_taskflows.configs.model_config
88

99
globals:
1010
repo:
11+
use_advisory:
1112
# Taskflow to audit some potential issues.
1213
taskflow:
1314
- task:
@@ -41,7 +42,9 @@ taskflow:
4142
4243
{{ result.issue_notes }}
4344
45+
{% if globals.use_advisory == 'true' %}
4446
{% include 'seclab_taskflows.prompts.audit.known_security_advisories' %}
47+
{% endif %}
4548
4649
{% include 'seclab_taskflows.prompts.audit.audit_issue' %}
4750
toolboxes:

src/seclab_taskflows/taskflows/audit/classify_application_local.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ model_config: seclab_taskflows.configs.model_config
88

99
globals:
1010
repo:
11+
use_advisory:
1112
# Taskflow to analyze the general contextual information of a project and classify the different applications within it
1213
taskflow:
1314
- task:
@@ -38,7 +39,9 @@ taskflow:
3839
can you tell me what type of application this repo is and what kind of security boundary it has.
3940
Based on this, determine whether the component is likely to have security problems.
4041
42+
{% if globals.use_advisory == 'true' %}
4143
{% include 'seclab_taskflows.prompts.audit.known_security_advisories' %}
44+
{% endif %}
4245
4346
Identify the most likely security problems in the component. Your task is not to carry out a full audit, but to
4447
identify the main risk in the component so that further analysis can be carried out.

0 commit comments

Comments
 (0)