Merge pull request 'Further improvements' (#6) from further-improvements into main

Reviewed-on: https://git.ts.mattnite.net/mattnite/cairn/pulls/6
This commit is contained in:
Matthew Knight 2026-03-06 03:24:50 +00:00
commit c96b893113
2 changed files with 14 additions and 15 deletions

View File

@ -79,7 +79,7 @@ runs:
FUZZ_BINARY: ${{ inputs.fuzz_binary }}
CORPUS_DIR: ${{ inputs.corpus_dir }}
DURATION: ${{ inputs.duration }}
AFL_ARGS: ${{ inputs.afl_args }}
EXTRA_AFL_ARGS: ${{ inputs.afl_args }}
TARGET: ${{ inputs.target }}
run: |
set -eu
@ -160,19 +160,18 @@ runs:
AFL_SKIP_CPUFREQ=1 \
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 \
AFL_NO_CRASH_README=1 \
AFL_EXIT_ON_TIME=60 \
timeout "${DURATION}s" \
afl-fuzz \
-V "${DURATION}" \
-i "${SEEDS}" \
-o "${FINDINGS}" \
${AFL_ARGS} \
${EXTRA_AFL_ARGS} \
-- "${FUZZ_BIN}" \
|| AFL_EXIT=$?
if [ "${AFL_EXIT}" -eq 124 ]; then
echo "AFL++ ran for full duration (${DURATION}s)"
elif [ "${AFL_EXIT}" -eq 0 ]; then
echo "AFL++ exited normally (coverage stagnated)"
if [ "${AFL_EXIT}" -eq 0 ]; then
echo "AFL++ exited normally (completed run)"
elif [ "${AFL_EXIT}" -eq 1 ]; then
echo "AFL++ exited after reaching duration limit (${DURATION}s)"
else
echo "AFL++ exited with code ${AFL_EXIT}"
fi

View File

@ -211,7 +211,7 @@ func cmdUpload(args []string) error {
if err := json.Unmarshal(body, &result); err != nil {
return fmt.Errorf("parsing response: %w", err)
}
fmt.Printf("Artifact uploaded: %s\n", result["id"])
fmt.Printf("Artifact uploaded: %v\n", result["id"])
return nil
}
@ -333,7 +333,7 @@ func cmdCampaign(subcmd string, args []string) error {
if err := json.Unmarshal(respBody, &result); err != nil {
return fmt.Errorf("parsing response: %w", err)
}
fmt.Printf("Campaign started: %s\n", result["id"])
fmt.Printf("Campaign started: %v\n", result["id"])
case "finish":
var id string