diff --git a/.github/workflows/demo-hawkscan.yml b/.github/workflows/demo-hawkscan.yml index 0ea2d9c..e4f6545 100644 --- a/.github/workflows/demo-hawkscan.yml +++ b/.github/workflows/demo-hawkscan.yml @@ -6,25 +6,16 @@ jobs: build-and-test: name: Build and test runs-on: ubuntu-latest - services: - postgres-db: - image: postgres - ports: - - 5432:5432 - env: - POSTGRES_DB: postgresql - POSTGRES_USER: postgresql - POSTGRES_PASSWORD: postgresql steps: - name: Checkout code uses: actions/checkout@v3 - name: Build and Run Vulny! run: docker-compose build && docker-compose up -d - name: HawkScan - uses: stackhawk/hawkscan-action@v2.0.0 + uses: stackhawk/hawkscan-action@v2.0.3 with: apiKey: ${{ secrets.HAWK_API_KEY }} - configurationFiles: stackhawk.d/stackhawk-custom-params.yml stackhawk-github-pr.yml + configurationFiles: stackhawk.d/stackhawk-custom-params.yml stackhawk.d/stackhawk-github-pr.yml env: COMMIT_SHA: ${{ github.event.pull_request.head.sha }} BRANCH_NAME: ${{ github.head_ref }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 70f44dc..ccdc5e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM openjdk:11.0.10-jdk-slim RUN mkdir /javavulny /app COPY . /javavulny/ +RUN sed -i 's/localhost\:5432/db\:5432/' /javavulny/src/main/resources/application-postgresql.properties RUN cd /javavulny \ && ./gradlew --no-daemon build \ diff --git a/docker-compose.yml b/docker-compose.yml index c3b8b99..91afb5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,6 @@ services: javavulny: build: . image: stackhawk/javavulny:latest - container_name: javavulny environment: SPRING_PROFILES_ACTIVE: postgresql ports: diff --git a/src/main/resources/application-postgresql.properties b/src/main/resources/application-postgresql.properties index 587a5d2..54e7835 100644 --- a/src/main/resources/application-postgresql.properties +++ b/src/main/resources/application-postgresql.properties @@ -1,5 +1,5 @@ spring.datasource.platform=postgres -spring.datasource.url=jdbc:postgresql://localhost/postgres +spring.datasource.url=jdbc:postgresql://localhost:5432/postgres spring.datasource.username=postgresql spring.datasource.password=postgresql spring.datasource.driverClassName=org.postgresql.Driver diff --git a/stackhawk.d/stackhawk-auth-json-token.yml b/stackhawk.d/stackhawk-auth-json-token.yml index 4b65bef..f23c8f2 100644 --- a/stackhawk.d/stackhawk-auth-json-token.yml +++ b/stackhawk.d/stackhawk-auth-json-token.yml @@ -1,11 +1,11 @@ app: - applicationId: ${APP_ID:44d63acb-a50b-4ab5-baa3-9508bb12691f} + applicationId: ${APP_ID:52565685-666d-4da7-b9d2-034af780217c} env: ${APP_ENV:custom-test} host: ${APP_HOST:https://localhost:9000} excludePaths: - "/logout" -# openApiConf: -# path: /openapi + openApiConf: + path: /openapi authentication: usernamePassword: type: JSON diff --git a/stackhawk.d/stackhawk-custom-params.yml b/stackhawk.d/stackhawk-custom-params.yml index 18b5c56..c05c2b1 100644 --- a/stackhawk.d/stackhawk-custom-params.yml +++ b/stackhawk.d/stackhawk-custom-params.yml @@ -1,5 +1,5 @@ app: - applicationId: ${APP_ID:44d63acb-a50b-4ab5-baa3-9508bb12691f} + applicationId: ${APP_ID:52565685-666d-4da7-b9d2-034af780217c} env: ${APP_ENV:custom-params} host: ${APP_HOST:https://localhost:9000} excludePaths: @@ -45,13 +45,18 @@ app: hawk: failureThreshold: high + spider: + base: false hawkAddOn: - spider: false - maxDurationMinutes: 10 scripts: - name: api1:2019-tennant-check.js id: 1000012 type: active path: stackhawk.d language: JAVASCRIPT +tags: + - name: _STACKHAWK_GIT_COMMIT_SHA + value: ${COMMIT_SHA} + - name: _STACKHAWK_GIT_BRANCH + value: ${BRANCH_NAME} diff --git a/stackhawk.d/stackhawk.yml b/stackhawk.d/stackhawk.yml index e6bed8c..7e3806d 100644 --- a/stackhawk.d/stackhawk.yml +++ b/stackhawk.d/stackhawk.yml @@ -1,4 +1,4 @@ app: - applicationId: ${APP_ID:dacc7d3e-babc-47d2-b040-ab117ab04526} + applicationId: ${APP_ID:52565685-666d-4da7-b9d2-034af780217c} env: ${APP_ENV:dev} host: ${APP_HOST:https://localhost:9000}