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

Feature/tomfoolery #84

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ca987d6
Create codeql.yml
d-co-white May 17, 2024
b63b11a
Removed old workflows added in codql
d-co-white May 17, 2024
4b17705
Added in hawkscan action
d-co-white May 18, 2024
c576c28
Fixing hawkscan
d-co-white May 18, 2024
10b016e
More things
d-co-white May 18, 2024
3172da1
hardcoding app id
d-co-white May 18, 2024
a63d502
Moar integrations
d-co-white May 18, 2024
d38a4d9
open api
d-co-white May 18, 2024
22386f6
github
d-co-white May 18, 2024
1366b35
SHA and branch
d-co-white May 18, 2024
1f0f742
Correct openapi path
d-co-white May 18, 2024
f11ad6a
TAGS
d-co-white May 18, 2024
360b129
Added in upload sarif task
d-co-white May 19, 2024
2158f58
Fixing workflow file
d-co-white May 19, 2024
73a08a0
Updated authentication
d-co-white May 19, 2024
9a644cd
turn base spider off
d-co-white May 19, 2024
2c7c9e9
updating actions removing debug
d-co-white May 19, 2024
a559ef2
Some sarif fixes
d-co-white May 19, 2024
2cd0a71
Real quick test
d-co-white May 19, 2024
6ba881a
Whatever
d-co-white May 19, 2024
23f45e6
committing
d-co-white May 19, 2024
40c27d1
I don't know where files go
d-co-white May 19, 2024
31ac766
ARGH
d-co-white May 19, 2024
610af84
Moar argh
d-co-white May 19, 2024
9a8680c
More testing
d-co-white May 19, 2024
f736f8e
ARGH
d-co-white May 19, 2024
ca9c085
I dont even
d-co-white May 19, 2024
d6f05cb
Cleanup
d-co-white May 19, 2024
9364ffb
more cleanup
d-co-white May 20, 2024
275610d
Merge pull request #1 from dco-test/feature/codql
d-co-white May 20, 2024
36557c1
cleanup
d-co-white May 20, 2024
91d3a54
things
d-co-white May 20, 2024
5756791
Removing sarif
d-co-white May 20, 2024
18aa7aa
Full scan
d-co-white May 20, 2024
ca0efc3
Remove stray workflow
d-co-white May 20, 2024
69c96f0
more things
d-co-white May 20, 2024
5bcc06d
Merge pull request #2 from dco-test/feature/more-stuff
d-co-white May 20, 2024
2a9593a
push permissions
d-co-white May 20, 2024
3098b69
Merge pull request #3 from dco-test/feature/permissions
d-co-white May 20, 2024
7afe4a9
curious
d-co-white May 20, 2024
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
14 changes: 0 additions & 14 deletions .github/workflows/build.yaml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: java-kotlin
build-mode: autobuild
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
47 changes: 47 additions & 0 deletions .github/workflows/hawkscan-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "action-tests"
on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
hawkscan:
name: Java Spring Vulny Test
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read
steps:
- name: Checkout javaspringvulny repository
uses: actions/checkout@v4
# - name: Run javaspringvulny
# run: docker-compose up -d
# - name: Run Hawkscan
# uses: stackhawk/[email protected]
# with:
# apiKey: ${{ secrets.HAWK_API_KEY }}
# configurationFiles: stackhawk.d/stackhawk.yml stackhawk.d/stackhawk-jsv-json-token.yml stackhawk.d/github-tags.yml
# env:
# APP_ID: fe3b8948-0edb-4fa4-a3b7-6fa200461f78
# ENV: action-scan
# SARIF_ARTIFACT: true
# COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
# BRANCH_NAME: ${{ github.head_ref }}
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
# Path to SARIF file relative to the root of the repository
sarif_file: stackhawk.sarif
# Optional category for the results
# Used to differentiate multiple results for one commit
category: StackHawk
32 changes: 0 additions & 32 deletions .github/workflows/hawkscan.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/release.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions stackhawk.d/github-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tags:
- name: _STACKHAWK_GIT_COMMIT_SHA
value: ${COMMIT_SHA:}
- name: _STACKHAWK_GIT_BRANCH
value: ${BRANCH_NAME:}
9 changes: 3 additions & 6 deletions stackhawk.d/stackhawk-jsv-json-token.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
hawk:
spider:
maxDurationMinutes: 2
base: false
app:
env: ${APP_ENV:dev}
openApiConf:
path: /openapi.yml
env: dev
host: ${APP_HOST:https://localhost:9000}
path: /openapi
authentication:
loggedInIndicator: "\\QSign Out\\E"
loggedOutIndicator: ".*Location:.*/login.*"
usernamePassword:
type: JSON
loginPath: /api/jwt/auth/signin
Expand All @@ -21,6 +17,7 @@ app:
type: HEADER
value: Authorization
tokenType: Bearer
isJWT: true
tokenExtraction:
type: TOKEN_PATH
value: "token"
Expand Down
Loading
Loading