diff --git a/content/1.workflows/1.syntax.md b/content/1.workflows/1.syntax.md index 16e5840..c5a575b 100644 --- a/content/1.workflows/1.syntax.md +++ b/content/1.workflows/1.syntax.md @@ -112,50 +112,59 @@ Expressions are to describe the scan that should run after some other scan has f scans: assetfinder: on: - cron: 0 0 0/12 * * * # at 00:00 and at 12:00, run this scan + cron: 0 1 0/12 * * * uploads: - - assetfinder.out # Specifies the file to be uploaded as a result for this scan + - output.txt steps: - - run: assetfinder ${{ vars.DOMAIN }} > assetfinder.out - shell: bash + - run: assetfinder ${{ vars.DOMAIN }} > output.txt + shell: bash + - run: sort -o output.txt -u output.txt + shell: bash + subfinder: on: - cron: 0 5 0/12 * * * # At 00:05 and 12:05, run this scan + cron: 0 15 0/12 * * * uploads: - - subfinder.out + - output.txt steps: - - run: subfinder -d ${{ vars.DOMAIN }} > subfinder.out - shell: bash - probe-subdomains: + - run: subfinder -d ${{ vars.DOMAIN }} > output.txt + shell: bash + - run: sort -o output.txt -u output.txt + shell: bash + + probe: on: expr: | - size(scans.assetfinder) > 0 + size(scans.assetfinder) > 0 && size(scans.subfinder) > 0 + && scans.assetfinder[0].status == 'succeeded' && scans.subfinder[0].status == 'succeeded' - && scans.subfinder[0].status == 'succeeded' + uploads: + - output.txt steps: - # Prepare a list of subdomains - run: | mkdir assetfinder cd assetfinder - bh job download -p ${{ project.id }} -w ${{ workflow.id }} -r ${{ revision.is }} -i ${{ scans.assetfiner[0].id }} -o output.zip + bh job download -p ${{ project.id }} -w ${{ workflow.id }} -r ${{ revision.id }} -i ${{ scans.assetfinder[0].id }} -o output.zip unzip output.zip rm output.zip shell: bash - - run: + - run: | mkdir subfinder cd subfinder - bh job download -p ${{ project.id }} -w ${{ workflow.id }} -r ${{ revision.is }} -i ${{ scans.subfiner[0].id }} -o output.zip + bh job download -p ${{ project.id }} -w ${{ workflow.id }} -r ${{ revision.id }} -i ${{ scans.subfinder[0].id }} -o output.zip unzip output.zip rm output.zip shell: bash - run: | - cat assetfiner/assetfinder.out > subdomains.txt + cat assetfinder/assetfinder.out > subdomains.txt cat subfinder/subfinder.out >> subdomains.txt sort -o subdomains.txt -u subdomains.txt shell: bash # Run httprobe on unique subdomains - - run: cat subdomains.txt | httprobe + - run: cat subdomains.txt | httprobe > output.txt + shell: bash + - run: sort -o output.txt -u output.txt shell: bash ```