mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
Update apis (#526)
* Update apis Closes #436 Updates APIs to 1.2-rc1 ahead of unscored round 2 * Update values.yaml * Bump competition/crs API to v1.2 * Breaking changes in competition api config * Check for SARIFs in CI (#527) * Check for SARIFs in CI * Remove trailing bracket --------- Co-authored-by: Henrik Brodin <90325907+hbrodin@users.noreply.github.com>
This commit is contained in:
@@ -34,12 +34,17 @@ on:
|
||||
description: "Timeout for bundle submission in minutes"
|
||||
required: false
|
||||
default: ""
|
||||
sarif_timeout:
|
||||
description: "Timeout for SARIF submission in minutes"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
env:
|
||||
FUZZER_BUILD_TIMEOUT: ${{ inputs.build_timeout || 20 }}
|
||||
VULN_TIMEOUT: ${{ inputs.vuln_timeout || 25 }}
|
||||
PATCH_TIMEOUT: ${{ inputs.patch_timeout || 15 }}
|
||||
BUNDLE_TIMEOUT: ${{ inputs.bundle_timeout || 5 }}
|
||||
SARIF_TIMEOUT: ${{ inputs.sarif_timeout || 5 }}
|
||||
FUZZ_TOOLING_CONTAINER_ORG: ${{ inputs.fuzz_tooling_container_org || 'aixcc-afc' }}
|
||||
|
||||
permissions:
|
||||
@@ -175,6 +180,27 @@ jobs:
|
||||
while ! kubectl logs -n $BUTTERCUP_NAMESPACE -l app=scheduler | grep "SUBMIT_BUNDLE -> SUBMIT_MATCHING_SARIF"; do
|
||||
sleep 10
|
||||
done
|
||||
- name: Send a SARIF broadcast
|
||||
timeout-minutes: ${{ fromJSON(env.SARIF_TIMEOUT) }}
|
||||
run: |
|
||||
TASK_ID=$(kubectl logs -n $BUTTERCUP_NAMESPACE -l app=scheduler | grep "SUBMIT_BUNDLE -> SUBMIT_MATCHING_SARIF" | grep -o "\[[^]]*\]" | grep -o "[^[]*$" | cut -d: -f2 | tr -d ']')
|
||||
echo "Task ID: $TASK_ID"
|
||||
kubectl port-forward -n $BUTTERCUP_NAMESPACE service/buttercup-competition-api 31323:1323 &
|
||||
sleep 5
|
||||
./orchestrator/scripts/send_sarif.sh $TASK_ID
|
||||
sleep 5
|
||||
- name: Wait for SARIF to be submitted as correct
|
||||
timeout-minutes: ${{ fromJSON(env.SARIF_TIMEOUT) }}
|
||||
run: |
|
||||
while ! kubectl logs -n $BUTTERCUP_NAMESPACE -l app=scheduler | grep "SUBMIT_MATCHING_SARIF -> SUBMIT_BUNDLE_PATCH"; do
|
||||
sleep 10
|
||||
done
|
||||
- name: Wait for Bundle to be patched to include the SARIF
|
||||
timeout-minutes: ${{ fromJSON(env.SARIF_TIMEOUT) }}
|
||||
run: |
|
||||
while ! kubectl logs -n $BUTTERCUP_NAMESPACE -l app=scheduler | grep "SUBMIT_BUNDLE_PATCH -> STOP"; do
|
||||
sleep 10
|
||||
done
|
||||
# TODO: re-enable seed-gen once it's fixed
|
||||
# - name: Wait for seed-gen to find PoV
|
||||
# timeout-minutes: 10 # low timeout because already waiting for prior steps
|
||||
|
||||
Reference in New Issue
Block a user