Skip to content

Commit 5e4c2a4

Browse files
authored
Merge pull request #49 from GitHubSecurityLab/anticomputer/fix-taskflow-user-prompts
fix grammar and spelling in user_prompt sections
2 parents f7db21e + c5e2c6e commit 5e4c2a4

20 files changed

Lines changed: 131 additions & 131 deletions

src/seclab_taskflows/taskflows/alert_triage_examples/triage_common/validate_user_input.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ taskflow:
1818
```
1919
{{ result.result }}
2020
```
21-
Check that the notes contains a section call "User-Controlled input" or similar.
21+
Check that the notes contain a section called "User-Controlled input" or similar.
2222
If the section is missing, then mark the alert as invalid and update the alert results
2323
with the reason saying that no user input is found.
2424
toolboxes:

src/seclab_taskflows/taskflows/alert_triage_examples/triage_taskflows/actions_common/audit_workflow_users.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ taskflow:
1717
user_prompt: |
1818
Fetch the file {{ result.user }} from the repo {{ result.repo }}.
1919
20-
Get the high privileged triggers for the of the workflow in the file {{ result.user }} and check if it is reusable.
20+
Get the high privileged triggers for the workflow in the file {{ result.user }} and check if it is reusable.
2121
If it does not contain any high privileged trigger AND it is not a reusable action, then the task is done.
2222
2323
Otherwise, check that the action specified by {{ result.user }} in repo {{ result.repo }} is active.
@@ -34,7 +34,7 @@ taskflow:
3434
You must mention the fact that {{ result.user }} uses {{ result.action }} in lines {{ result.lines }}
3535
in the notes.
3636
You must also include all the permissions granted to the {{ result.user }} action in the notes, and all the triggers of the action.
37-
Finally, update the all the alert result that has {{ result.action }} with the results in your notes using `update_all_alert_results_for_flow_graph` with
37+
Finally, update all the alert results that have {{ result.action }} with the results in your notes using `update_all_alert_results_for_flow_graph` with
3838
your notes as the `results`, {{ result.action }} as the `next` and {{ result.repo }} as the `repo`.
3939
toolboxes:
4040
- seclab_taskflows.toolboxes.gh_file_viewer

src/seclab_taskflows/taskflows/alert_triage_examples/triage_taskflows/actions_common/trigger_analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ taskflow:
4242
4343
1. Inspect the workflow file to see if any permission is granted to the action. List all the permissions in your notes
4444
2. Then check and see if the action is using any secrets.
45-
IMPORTANT: Do not consider GITHUB_TOKEN as a secret. Include the name of the all the secrets and their line numbers in the notes.
45+
IMPORTANT: Do not consider GITHUB_TOKEN as a secret. Include the name of all the secrets and their line numbers in the notes.
4646
4747
4848
Take notes while assessing the alert, including the trigger, permissions, and secrets used by the action.

src/seclab_taskflows/taskflows/alert_triage_examples/triage_taskflows/create_issues_actions.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ taskflow:
6464
- seclab_taskflow_agent.personalities.assistant
6565
exclude_from_context: true
6666
user_prompt: |
67-
Fetch the all the completed alert results from that has the rule `{{ globals.rule }}`.
67+
Fetch all the completed alert results that have the rule `{{ globals.rule }}`.
6868
toolboxes:
6969
- seclab_taskflows.toolboxes.report_alert_state
7070
- task:
@@ -180,6 +180,6 @@ taskflow:
180180
- seclab_taskflow_agent.personalities.assistant
181181
exclude_from_context: true
182182
user_prompt: |
183-
Fetch the all the invalid alert results from that has the rule `{{ globals.rule }}`.
183+
Fetch all the invalid alert results that have the rule `{{ globals.rule }}`.
184184
toolboxes:
185185
- seclab_taskflows.toolboxes.report_alert_state

src/seclab_taskflows/taskflows/alert_triage_examples/triage_taskflows/review_actions_injection_issues.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ taskflow:
5555
{% include 'seclab_taskflows.prompts.triage_taskflows.actions_common.check_dismiss_reason' %}
5656
5757
IMPORTANT:
58-
1. If the dismissal reason does not apply the issue, then you must not dismiss the alert. In particular,
58+
1. If the dismissal reason does not apply to the issue, then you must not dismiss the alert. In particular,
5959
DO NOT try to reason about code injection sanitizer beyond the dismissal reason.
6060
6161
2. A security check has to restrict the permission or privilege of the user, simple checks that

src/seclab_taskflows/taskflows/alert_triage_examples/triage_taskflows/triage_actions_code_injection.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ taskflow:
137137
echo "The issue title is: ${{ env.ISSUE_TITLE }}"
138138
```
139139
IMPORTANT:
140-
However, if envoirnment variables are not set in the `env` section, but are set in the `run` section, then it is vulnerable to code injection:
140+
However, if environment variables are not set in the `env` section, but are set in the `run` section, then it is vulnerable to code injection:
141141
```
142142
run: |
143143
echo "TITLE=${{ github.event.issue.title }}" >> $GITHUB_ENV
@@ -200,13 +200,13 @@ taskflow:
200200
only consider whether the code at the alert location {{ result.location }} is affected by a sanitizer or a check that takes
201201
place before the code injection vulnerability at {{ result.location }}.
202202
203-
If the sanitizer is still valid include update the alert results with these information using the alert_id {{ result.alert_id }} and repo {{ result.repo }} in the
204-
`update_alert_result` tool with your notes as the `result`. Remember to include the line numbers of the checks or sanitizers in the notes.
203+
If the sanitizer is still valid, update the alert results with this information using the alert_id {{ result.alert_id }} and repo {{ result.repo }} in the
204+
`update_alert_result` tool with your notes as the `result`. Remember to include the line numbers of the checks or sanitizers in the notes,
205205
and then set the `valid` field of the alert result to `false` using alert_id {{ result.alert_id }} and repo {{ result.repo }}.
206206
207207
IMPORTANT:
208-
You must only based your decision on the present of sanitizer and check and not any other factors. And do not include
209-
comment on any other factors that may affect the code injection vulnerability.
208+
You must only base your decision on the presence of sanitizers and checks and not any other factors. And do not include
209+
comments on any other factors that may affect the code injection vulnerability.
210210
toolboxes:
211211
- seclab_taskflows.toolboxes.gh_file_viewer
212212
- seclab_taskflows.toolboxes.report_alert_state
@@ -218,7 +218,7 @@ taskflow:
218218
agents:
219219
- seclab_taskflow_agent.personalities.assistant
220220
user_prompt: |
221-
Fetch the valid alert results from that has the rule `{{ globals.rule }}`.
221+
Fetch the valid alert results that have the rule `{{ globals.rule }}`.
222222
toolboxes:
223223
- seclab_taskflows.toolboxes.report_alert_state
224224
- task:
@@ -249,7 +249,7 @@ taskflow:
249249
agents:
250250
- seclab_taskflow_agent.personalities.assistant
251251
user_prompt: |
252-
Fetch the all the alert results from that has the rule `{{ globals.rule }}`.
252+
Fetch all the alert results that have the rule `{{ globals.rule }}`.
253253
toolboxes:
254254
- seclab_taskflows.toolboxes.report_alert_state
255255
- task:
@@ -259,7 +259,7 @@ taskflow:
259259
Review the information gathered from the audit notes to determine whether this alert is a FP.
260260
inputs:
261261
vuln_specifics: |
262-
DO NOT look for sanitizers of user input beyond those mentioned in the notes. If the notes does not
262+
DO NOT look for sanitizers of user input beyond those mentioned in the notes. If the notes do not
263263
mention any sanitizers used on the user input, then assume that the user input is not sanitized, even if
264264
you think the code is safe from code injection.
265265
- task:
@@ -269,7 +269,7 @@ taskflow:
269269
agents:
270270
- seclab_taskflow_agent.personalities.assistant
271271
user_prompt: |
272-
Fetch the valid the alert results from that has the rule `{{ globals.rule }}`.
272+
Fetch the valid alert results that have the rule `{{ globals.rule }}`.
273273
toolboxes:
274274
- seclab_taskflows.toolboxes.report_alert_state
275275
- task:
@@ -309,5 +309,5 @@ taskflow:
309309
uses: seclab_taskflows.taskflows.alert_triage_examples.triage_taskflows.actions_common.check_report
310310
inputs:
311311
vuln_specifics: |
312-
You decision must be based only on the criteria above, and not any other factors.
312+
Your decision must be based only on the criteria above, and not any other factors.
313313
DO NOT mark the alert as invalid if you think the code is safe from code injection.

src/seclab_taskflows/taskflows/alert_triage_examples/triage_taskflows/triage_js_ts_client_side_xss.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ taskflow:
5353
Exploitable means that a remote attacker would be able to inject a malicious script into the web application that would be executed in the context of a user visiting the page.
5454
This could include a `javascript:` URL, a `<script>` tag, or any other way to inject JavaScript code into the page.
5555
It also means that the XSS vulnerability is not mitigated by any other code in the repository, such as sanitization or validation of the input.
56-
Check if the code tries to sanitize or validate the input. F.ex. if the output is encoded before being sent back. Or if a Regex is used to validate the input.
57-
Also check if the Regex only let's true a subset of the provided input.
56+
Check if the code tries to sanitize or validate the input. For example, if the output is encoded before being sent back. Or if a Regex is used to validate the input.
57+
Also check if the Regex only lets through a subset of the provided input.
5858
Take note of relevant regex patterns.
5959
Analyze all Regex patterns used in the code to see if they are effective against cross-site scripting (XSS) attacks. Let's think step by step and explain how the Regex works.
6060
If you encounter methods used for validation or sanitization, look them up and check if they are effective against cross-site scripting (XSS) attacks.
@@ -75,7 +75,7 @@ taskflow:
7575
7676
If the vulnerable code sink is part of code that retrieves messages from WebSockets e.g. inside `onMessage`,
7777
the XSS-vulnerability is likely not exploitable as the attacker would need to be able to send a message to the WebSocket
78-
(this might be possible if the WebSocket would be used as some sort of chat notifcation system between users).
78+
(this might be possible if the WebSocket would be used as some sort of chat notification system between users).
7979
Take notes while assessing the alert.
8080
If prompt token count exceeds the given limit note this in the result and mark the task as complete.
8181
Update the results field of the alert result with your notes using `update_alert_result` with
@@ -92,7 +92,7 @@ taskflow:
9292
agents:
9393
- seclab_taskflow_agent.personalities.assistant
9494
user_prompt: |
95-
Fetch the valid alert results that has the rule `{{ globals.rule }}`.
95+
Fetch the valid alert results that have the rule `{{ globals.rule }}`.
9696
toolboxes:
9797
- seclab_taskflows.toolboxes.report_alert_state
9898
- task:
@@ -122,7 +122,7 @@ taskflow:
122122
agents:
123123
- seclab_taskflow_agent.personalities.assistant
124124
user_prompt: |
125-
Fetch the valid alert results that has the rule `{{ globals.rule }}`.
125+
Fetch the valid alert results that have the rule `{{ globals.rule }}`.
126126
toolboxes:
127127
- seclab_taskflows.toolboxes.report_alert_state
128128
- task:
@@ -140,7 +140,7 @@ taskflow:
140140
agents:
141141
- seclab_taskflow_agent.personalities.assistant
142142
user_prompt: |
143-
Fetch the valid alert results that has the rule `{{ globals.rule }}`.
143+
Fetch the valid alert results that have the rule `{{ globals.rule }}`.
144144
toolboxes:
145145
- seclab_taskflows.toolboxes.report_alert_state
146146
- task:

src/seclab_taskflows/taskflows/alert_triage_examples/triage_taskflows/triage_js_ts_path_injection.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ taskflow:
2626
agents:
2727
- seclab_taskflow_agent.personalities.assistant
2828
user_prompt: |
29-
Fetch the alert results that has the rule `js/path-injection`.
29+
Fetch the alert results that have the rule `js/path-injection`.
3030
toolboxes:
3131
- seclab_taskflows.toolboxes.report_alert_state
3232
- task:
@@ -69,7 +69,7 @@ taskflow:
6969
async: true
7070
user_prompt: |
7171
Check all results whether they contain next steps that need to be taken. If they do, then take those steps.
72-
In case code parts (such as methods) were not found previosuly, look them up and change the notes accordingly.
72+
In case code parts (such as methods) were not found previously, look them up and change the notes accordingly.
7373
Update the results field of the alert result with your notes using `update_alert_result` using the updated notes.
7474
toolboxes:
7575
- seclab_taskflows.toolboxes.gh_file_viewer

src/seclab_taskflows/taskflows/alert_triage_examples/triage_taskflows/triage_untrusted_checkout_critical.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ taskflow:
3030
agents:
3131
- seclab_taskflow_agent.personalities.assistant
3232
user_prompt: |
33-
Fetch the alert results that has the rule `{{ globals.rule }}`.
33+
Fetch the alert results that have the rule `{{ globals.rule }}`.
3434
toolboxes:
3535
- seclab_taskflows.toolboxes.report_alert_state
3636
- task:
@@ -45,7 +45,7 @@ taskflow:
4545
agents:
4646
- seclab_taskflow_agent.personalities.assistant
4747
user_prompt: |
48-
Fetch the valid alert results that has the rule `{{ globals.rule }}`.
48+
Fetch the valid alert results that have the rule `{{ globals.rule }}`.
4949
toolboxes:
5050
- seclab_taskflows.toolboxes.report_alert_state
5151
- task:
@@ -99,7 +99,7 @@ taskflow:
9999
agents:
100100
- seclab_taskflow_agent.personalities.assistant
101101
user_prompt: |
102-
Fetch the valid alert results from that has the rule `{{ globals.rule }}`.
102+
Fetch the valid alert results that have the rule `{{ globals.rule }}`.
103103
toolboxes:
104104
- seclab_taskflows.toolboxes.report_alert_state
105105
- task:
@@ -130,7 +130,7 @@ taskflow:
130130
agents:
131131
- seclab_taskflow_agent.personalities.assistant
132132
user_prompt: |
133-
Fetch the all the alert results from that has the rule `{{ globals.rule }}`.
133+
Fetch all the alert results that have the rule `{{ globals.rule }}`.
134134
toolboxes:
135135
- seclab_taskflows.toolboxes.report_alert_state
136136
- task:
@@ -157,7 +157,7 @@ taskflow:
157157
agents:
158158
- seclab_taskflow_agent.personalities.assistant
159159
user_prompt: |
160-
Fetch the valid the alert results from that has the rule `{{ globals.rule }}`.
160+
Fetch the valid alert results that have the rule `{{ globals.rule }}`.
161161
toolboxes:
162162
- seclab_taskflows.toolboxes.report_alert_state
163163
- task:

src/seclab_taskflows/taskflows/audit/acl_check.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ taskflow:
2020
Fetch the list of issues for component {{ globals.id }} in repo {{ globals.repo }}. Check if there is any issue
2121
that involves access control or authentication. If there isn't any, then your task is finished.
2222
23-
If there are any authentication or access control that are crucial in determining whether issue is vulnerable or not,
24-
then go through these measures and look carefully to see if there is any way to bypass these checks. Also look for
25-
inconsistencies in access controls. The goal of this task is to scrutinize the access control, authentication
26-
relevent to the issue. You should limit your audit to those that are involved in the in issue.
23+
If there are any authentication or access controls that are crucial in determining whether the issue is vulnerable or not,
24+
then go through these measures and look carefully to see if there is any way to bypass these checks. Also look for
25+
inconsistencies in access controls. The goal of this task is to scrutinize the access control and authentication
26+
relevant to the issue. You should limit your audit to those that are involved in the issue.
2727
28-
Look at the authentication and access control mechanism used in this component. Note that the implementation of
29-
the authentication and access control may well be defined outside of this component. In which case, you need to
30-
look at files in the repo outside of the component. For each end point, take note of
31-
its intended functionality and any access control/authetnication that is applied. When looking at access control,
28+
Look at the authentication and access control mechanisms used in this component. Note that the implementation of
29+
the authentication and access control may well be defined outside of this component. In which case, you need to
30+
look at files in the repo outside of the component. For each endpoint, take note of
31+
its intended functionality and any access control/authentication that is applied. When looking at access control,
3232
do not just check if access control is applied, but note down the exact role/authority that is required.
3333
34-
Go through the list of access control and authentication that you made earlier, and consider the followings:
35-
- Look through end points functionalities and identify those that should require similar level of privilege. For example,
36-
endpoint that modifies data should require similar privilege to endpoints that write to data, but endpoints that only
37-
read data allows lower privilege. Within the group of endpoint, do access control ensure that they have the same privilege?
38-
Or do some endpoint required higher privilege than others? Take a note of such inconsistencies stating clearly
39-
which endpoints should require similar privilege but doesn't. Then decide whether it is
34+
Go through the list of access control and authentication that you made earlier, and consider the following:
35+
- Look through endpoint functionalities and identify those that should require similar levels of privilege. For example,
36+
endpoints that modify data should require similar privilege to endpoints that write to data, but endpoints that only
37+
read data allow lower privilege. Within the group of endpoints, does access control ensure that they have the same privilege?
38+
Or do some endpoints require higher privilege than others? Take note of such inconsistencies stating clearly
39+
which endpoints should require similar privilege but don't. Then decide whether it is
4040
a security issue or not.
4141
4242
- Are there other ways to bypass ownership/access control checks via IDOR etc.?

0 commit comments

Comments
 (0)