Skip to content

Commit 4ca7a95

Browse files
authored
setup ossf scorecard and codql workflow (#304)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent 95048ae commit 4ca7a95

6 files changed

Lines changed: 103 additions & 3 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily

.github/workflows/codeql.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
branches:
9+
- "main"
10+
schedule:
11+
- cron: '16 11 * * 5'
12+
13+
permissions:
14+
contents: read
15+
16+
17+
jobs:
18+
analyze:
19+
name: Analyze
20+
runs-on: 'ubuntu-22.04'
21+
timeout-minutes: 360
22+
permissions:
23+
actions: read
24+
contents: read
25+
security-events: write
26+
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
language:
31+
- java-kotlin
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36+
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
39+
with:
40+
languages: ${{ matrix.language }}
41+
42+
- name: Autobuild
43+
uses: github/codeql-action/autobuild@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
44+
45+
- name: Perform CodeQL Analysis
46+
uses: github/codeql-action/analyze@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
47+
with:
48+
category: "/language:${{matrix.language}}"

.github/workflows/compare-envoy-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
outputs:
1313
target-version: ${{ steps.compare-latest-to-current-version.outputs.target-version }}
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1616
- name: Fetch latest Envoy version
1717
id: latest-envoy-version
1818
run: |

.github/workflows/scorecard.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
branch_protection_rule:
4+
schedule:
5+
- cron: '33 13 * * 5'
6+
push:
7+
branches:
8+
- "main"
9+
10+
permissions:
11+
contents: read
12+
13+
14+
jobs:
15+
analysis:
16+
name: Scorecard analysis
17+
runs-on: ubuntu-22.04
18+
permissions:
19+
security-events: write
20+
id-token: write
21+
22+
steps:
23+
- name: "Checkout code"
24+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+
with:
26+
persist-credentials: false
27+
28+
- name: "Run analysis"
29+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
30+
with:
31+
results_file: results.sarif
32+
results_format: sarif
33+
publish_results: true
34+
35+
- name: "Upload artifact"
36+
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
37+
with:
38+
name: SARIF file
39+
path: results.sarif
40+
retention-days: 5
41+
42+
- name: "Upload to code-scanning"
43+
uses: github/codeql-action/upload-sarif@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
44+
with:
45+
sarif_file: results.sarif

.github/workflows/update-protobuf.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
update-protobuf:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1515
- name: Run scripts
1616
working-directory: ./tools/
1717
run: |
1818
./update-sha.sh ${{ inputs.envoy_version }} | tee API_SHAS
1919
./update-api.sh
2020
- name: Create Pull Request
21-
uses: peter-evans/create-pull-request@v3
21+
uses: peter-evans/create-pull-request@18f7dc018cc2cd597073088f7c7591b9d1c02672 # v3.14.0
2222
with:
2323
branch: update-protobuf-to-${{ inputs.envoy_version }}
2424
base: main

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# java-control-plane
22

3+
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/envoyproxy/java-control-plane/badge)](https://api.securityscorecards.dev/projects/github.com/envoyproxy/java-control-plane)
34
[![CircleCI](https://circleci.com/gh/envoyproxy/java-control-plane.svg?style=svg)](https://circleci.com/gh/envoyproxy/java-control-plane) [![codecov](https://codecov.io/gh/envoyproxy/java-control-plane/branch/main/graph/badge.svg)](https://codecov.io/gh/envoyproxy/java-control-plane) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.envoyproxy.controlplane/java-control-plane/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.envoyproxy.controlplane/java-control-plane)
45

56
This repository contains a Java-based implementation of an API server that implements the discovery service APIs defined

0 commit comments

Comments
 (0)