Skip to content

Commit 031e503

Browse files
feat: Add security-gates and update README (#413)
* Add security-gates workflow and update README * Add security-gates workflow and update README * Add security-gates workflow and update README * Update scorecard.yml --------- Co-authored-by: Oğuzhan Soykan <[email protected]>
1 parent 2b8d2d6 commit 031e503

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,11 @@ jobs:
3737
verbose: true
3838
token: ${{ secrets.CODECOV_TOKEN }}
3939
if: github.ref == 'refs/heads/main'
40+
41+
42+
security-gates:
43+
uses: Trendyol/security-actions/.github/workflows/security-gates.yml@master
44+
permissions:
45+
actions: read
46+
contents: read
47+
security-events: write

.github/workflows/scorecard.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
2+
name: Scorecard supply-chain security
3+
4+
on:
5+
branch_protection_rule:
6+
schedule:
7+
- cron: '29 23 * * 3'
8+
push:
9+
branches: [ "main", "master"]
10+
pull_request:
11+
branches: ["main", "master"]
12+
13+
permissions: read-all
14+
15+
jobs:
16+
visibility-check:
17+
outputs:
18+
visibility: ${{ steps.drv.outputs.visibility }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Determine repository visibility
22+
id: drv
23+
run: |
24+
visibility=$(gh api /repos/$GITHUB_REPOSITORY --jq '.visibility')
25+
echo "visibility=$visibility" >> $GITHUB_OUTPUT
26+
env:
27+
GH_TOKEN: ${{ github.token }}
28+
29+
analysis:
30+
if: ${{ needs.visibility-check.outputs.visibility == 'public' }}
31+
needs: visibility-check
32+
runs-on: ubuntu-latest
33+
permissions:
34+
security-events: write
35+
id-token: write
36+
steps:
37+
- name: "Checkout code"
38+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
39+
with:
40+
persist-credentials: false
41+
42+
- name: "Run analysis"
43+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736
44+
with:
45+
results_file: results.sarif
46+
results_format: sarif
47+
publish_results: true
48+
49+
- name: "Upload artifact"
50+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
51+
with:
52+
name: SARIF file
53+
path: results.sarif
54+
retention-days: 5
55+
56+
# Upload the results to GitHub's code scanning dashboard (optional).
57+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
58+
- name: "Upload to code-scanning"
59+
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
60+
with:
61+
sarif_file: results.sarif
62+
63+

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Trendyol/kediatR/badge)](https://scorecard.dev/viewer/?uri=github.com/Trendyol/kediatR)
13
# kediatR [![codecov](https://codecov.io/gh/trendyol/kediatr/branch/main/graph/badge.svg)](https://codecov.io/gh/trendyol/kediatr)
24

35
<img style="float: left" alt="Humus! The kediatr mascot" src="/humus.png" alt="drawing" width="80"/>

0 commit comments

Comments
 (0)