Skip to content

Instantly share code, notes, and snippets.

@jgamblin
Created November 7, 2018 19:19
Show Gist options
  • Save jgamblin/636cdd8776d294640b08bd452b59e096 to your computer and use it in GitHub Desktop.
Save jgamblin/636cdd8776d294640b08bd452b59e096 to your computer and use it in GitHub Desktop.
Shell Script To Scan A Site With Burp Generic CI Driver and Open Github Issues From Findings
#!/bin/bash
# Scan A Site With Burp Generic CI Driver and Open Github Issues From Findings
URL=$1
Github_Auth_Token=""
Github_Repo_URL="https://api.github.com/repos/%yourgithubusername%/%yourgithubrepo%/issues"
min_severity_burp="low"
echo BURP_SCAN_URL = https://"$URL" | java -jar burp-ci-driver-v1.0.5beta.jar http://127.0.0.1:1337/ --min-severity="$min_severity_burp" --json | tee "$URL"-issues.log
cat "$URL"-issues.log | sed -n -e 's/^.*BURP_SCAN_ISSUE_EVENT_JSON: //p' | jq > "$URL"-issues.json
sample=$(cat "$URL"-issues.json)
for row in $(echo "${sample}" | jq -r '.issue | @base64'); do
_jq() {
echo ${row} | base64 --decode | jq -r ${1}
}
name="$(_jq '.name')"
description="$(_jq '.description')"
curl -i -H 'Authorization: token '$Github_Auth_Token'' -H "Content-Type: application/json" -X POST --data '{"title":"'"$name"'", "body":"'"$description"'"}' $Github_Repo_URL
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment