From 1eafd7db1b56e842a2ee7feb19547f8acd372c47 Mon Sep 17 00:00:00 2001 From: webpwnized Date: Sat, 4 Nov 2023 22:25:43 -0400 Subject: [PATCH] 1.0.56 Add GitHub Action for Hawkscan --- .../scan-application-with-stackhawk.yml | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/scan-application-with-stackhawk.yml b/.github/workflows/scan-application-with-stackhawk.yml index 370b7ed..fafef3e 100644 --- a/.github/workflows/scan-application-with-stackhawk.yml +++ b/.github/workflows/scan-application-with-stackhawk.yml @@ -51,27 +51,26 @@ jobs: # Starting containers using Docker Compose. docker-compose -f docker-compose.yml up -d; - # Step 4: Run Database Build Script + # Step 4: Load Users into LDAP Directory + - name: Load Users into LDAP Directory + run: | + + # Uploading Mutillidae LDIF file to LDAP directory server. + # ldapadd will exit with non-zero exit code if user already exists in the directory + # Use || true to force zero exit code + CURRENT_DIRECTORY=$(pwd); + ldapadd -c -x -D "cn=admin,dc=mutillidae,dc=localhost" -w mutillidae -H ldap:// -f $CURRENT_DIRECTORY/ldap/ldif/mutillidae.ldif || true; + + # Step 5: Run Database Build Script - name: Run Database Build Script run: | # Waiting for the database to start. - sleep 10; + sleep 30; # Requesting Mutillidae database be built. curl http://127.0.0.1/set-up-database.php; - # Step 5: Load Users into LDAP Directory - - name: Load Users into LDAP Directory - # ldapadd will exit with the exit code equal to the number of users added into the LDAP directory - # Use "if always()"" to override Github Action failure - if: always() - run: | - - # Uploading Mutillidae LDIF file to LDAP directory server. - CURRENT_DIRECTORY=$(pwd); - ldapadd -c -x -D "cn=admin,dc=mutillidae,dc=localhost" -w mutillidae -H ldap:// -f $CURRENT_DIRECTORY/ldap/ldif/mutillidae.ldif; - # Step 6: Run StackHawk Scan - name: Run StackHawk Scan with SARIF result uses: stackhawk/hawkscan-action@v2