Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to app ID #2

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions .github/workflows/demo-hawkscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].0
uses: stackhawk/[email protected].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 }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ services:
javavulny:
build: .
image: stackhawk/javavulny:latest
container_name: javavulny
environment:
SPRING_PROFILES_ACTIVE: postgresql
ports:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-postgresql.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions stackhawk.d/stackhawk-auth-json-token.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions stackhawk.d/stackhawk-custom-params.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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}
2 changes: 1 addition & 1 deletion stackhawk.d/stackhawk.yml
Original file line number Diff line number Diff line change
@@ -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}