Skip to content

Commit

Permalink
feat: add codeql GHA and cron job for image build to run trivy (#119)
Browse files Browse the repository at this point in the history
* feat: add codeql GHA and cron job for image build to run trivy

* Not using gradle. Setup golang instead

* fix go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc vulnerability

* undo modules upgrade. will be handled in #120
  • Loading branch information
tim-mwangi authored Dec 14, 2023
1 parent 04640a9 commit ac72f90
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
paths-ignore:
- "**/*.md"
- "LICENSE"
schedule:
- cron: '37 21 * * 5'
jobs:
test-and-build:
strategy:
Expand Down Expand Up @@ -64,3 +66,4 @@ jobs:
with:
image: hypertrace/hypertrace-collector
tag: latest
output-mode: github
50 changes: 50 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "CodeQL"

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '37 21 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
go-version: ["1.20"]

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1282,4 +1282,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6Lv
sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=

0 comments on commit ac72f90

Please sign in to comment.