Skip to content

Instantly share code, notes, and snippets.

@vfreex
Created April 27, 2020 07:05
Show Gist options
  • Save vfreex/5a112dffa0a45f9a5159a1da95358570 to your computer and use it in GitHub Desktop.
Save vfreex/5a112dffa0a45f9a5159a1da95358570 to your computer and use it in GitHub Desktop.
attach-security-bugs.sh
#!/bin/bash
TRACKER=$1
if [ -z "$TRACKER" ]; then
echo "Usage: $0 TRACKER_BUG_ID"
exit 1
fi
echo "Finding flaw bugs for tracker $TRACKER..."
FLAW_BUGS=$(bugzilla query --product 'Security Response' --component vulnerability --dependson "$TRACKER" --ids)
echo "Found $(echo "$FLAW_BUGS" | wc -l) flaws bugs."
echo "$FLAW_BUGS"
echo "Please run the following command to attach flaw bugs to an advisory:"
echo $FLAW_BUGS | xargs printf -- '--id %s\n' | xargs echo elliott --group=openshift-4.1 find-bugs --mode=list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment