Skip to content

Commit

Permalink
Fix all vulnerabilities and update the Github Actions for snyk and co…
Browse files Browse the repository at this point in the history
…deql
  • Loading branch information
Bdegraaf1234 committed Apr 2, 2024
1 parent f6ad635 commit 450aee1
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 16 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# 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", "dev" ]
pull_request:
branches: [ "main", "dev" ]
schedule:
- cron: '24 21 * * 0'

jobs:
analyze:
name: Analyze
# 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
# Consider using larger runners 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

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

strategy:
fail-fast: false
matrix:
language: [ 'java-kotlin' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# 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


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ 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 the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ jobs:
# Use runtime labels from docker_meta as well as fixed labels
labels: |
${{ steps.docker_meta.outputs.labels }}
maintainer=Joris Borgdorff <joris@thehyve.nl>
org.opencontainers.image.authors=Joris Borgdorff <joris@thehyve.nl>
maintainer=Bastiaan de Graaf <bastiaan@thehyve.nl>
org.opencontainers.image.authors=Bastiaan de Graaf <bastiaan@thehyve.nl>
org.opencontainers.image.vendor=RADAR-base
org.opencontainers.image.licenses=Apache-2.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ jobs:
# Use runtime labels from docker_meta as well as fixed labels
labels: |
${{ steps.docker_meta.outputs.labels }}
maintainer=Joris Borgdorff <joris@thehyve.nl>
org.opencontainers.image.authors=Joris Borgdorff <joris@thehyve.nl>
maintainer=Bastiaan de Graaf <bastiaan@thehyve.nl>
org.opencontainers.image.authors=Bastiaan de Graaf <bastiaan@thehyve.nl>
org.opencontainers.image.vendor=RADAR-base
org.opencontainers.image.licenses=Apache-2.0
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- main
- dev

jobs:
security:
Expand All @@ -29,3 +30,6 @@ jobs:
--configuration-matching='^runtimeClasspath$'
--org=radar-base
--policy-path=$PWD/.snyk
--all-projects
--severity-threshold=high
--fail-on=upgradable
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ radarPublishing {
githubUrl.set("https://github.com/$githubRepoName.git")
developers {
developer {
id.set("blootsvoets")
name.set("Joris Borgdorff")
email.set("joris@thehyve.nl")
id.set("bdegraaf1234")
name.set("Bastiaan de Graaf")
email.set("bastiaan@thehyve.nl")
organization.set("The Hyve")
}
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.8.21"
kotlin("jvm") version "1.9.22"
}

repositories {
Expand Down
16 changes: 8 additions & 8 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ object Versions {
const val project = "2.3.3-SNAPSHOT"

const val java = 17
const val kotlin = "1.9.10"
const val kotlin = "1.9.22"
const val dockerCompose = "0.17.5"

const val radarCommons = "1.1.1"
const val radarSchemas = "0.8.5"
const val radarCommons = "1.1.2"
const val radarSchemas = "0.8.7"
const val jackson = "2.15.3"
const val slf4j = "2.0.9"
const val log4j2 = "2.21.0"
Expand All @@ -19,19 +19,19 @@ object Versions {

const val wrapper = "8.4"

const val managementPortal = "2.1.0"
const val managementPortal = "2.1.1"
const val coroutines = "1.7.3"
const val snappy = "1.1.10.5"
const val jCommander = "1.82"
const val almworks = "1.1.2"
const val minio = "8.5.6"
const val minio = "8.5.9"
const val guava = "31.1-jre"
const val opencsv = "5.8"
const val okhttp = "4.12.0"
const val jedis = "5.0.1"
const val azureStorage = "12.24.0"
const val jedis = "jedis-3.6.2"
const val azureStorage = "12.25.1"
const val netty = "4.1.100.Final"
const val snakeYaml = "2.2"
const val apacheCommonsText = "1.10.0"
const val projectReactorNetty = "1.1.11"
const val projectReactorNetty = "1.1.13"
}

0 comments on commit 450aee1

Please sign in to comment.