File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sonar Scan
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - develop
8+ - master
9+ - ' release/**'
10+ pull_request :
11+
12+ permissions :
13+ contents : read
14+
15+ jobs :
16+ sonar :
17+ name : Sonar Scan
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+
26+ - name : Set up Go
27+ uses : actions/setup-go@v5
28+ with :
29+ go-version : ' 1.26.2'
30+
31+ - name : Install dependencies
32+ run : go mod download
33+
34+ - name : Run tests with coverage
35+ run : |
36+ go test -v ./... \
37+ -coverprofile=coverage.out \
38+ -covermode=atomic \
39+ -coverpkg=./...
40+
41+ - name : Show coverage summary
42+ run : |
43+ go tool cover -func=coverage.out
44+
45+ - name : Sonar Scan
46+ uses : SonarSource/sonarqube-scan-action@v6
47+ env :
48+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
49+ SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
50+ SONAR_ORGANIZATION : ${{ secrets.SONAR_ORGANIZATION }}
51+
52+ # - name: Sonar Quality Gate
53+ # uses: SonarSource/sonarqube-quality-gate-action@v1.1.0
54+ # timeout-minutes: 10
55+ # env:
56+ # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
57+ # SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
Original file line number Diff line number Diff line change 1+ name : Security - Trivy
2+
3+ on :
4+ push :
5+ branches : [main, develop]
6+ pull_request :
7+
8+ permissions :
9+ contents : read
10+ security-events : write
11+
12+ jobs :
13+ trivy :
14+ name : Trivy Scan
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+
21+ - name : Run Trivy Scan
22+ uses : aquasecurity/trivy-action@v0.35.0
23+ with :
24+ scan-type : fs
25+ format : sarif
26+ output : trivy-results.sarif
27+ severity : CRITICAL,HIGH
28+
29+ - name : Upload results to GitHub Security
30+ uses : github/codeql-action/upload-sarif@v3
31+ with :
32+ sarif_file : trivy-results.sarif
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1- sonar.projectKey =aptlogica_sereni-email-smtp_81bfe731-8d64-4b02-a58c-81c48abd4f9a
1+ sonar.projectKey =aptlogica_sereni-email-smtp
2+ sonar.organization =aptlogica
23
34sonar.language =go
45sonar.sources =cmd,pkg,internal
You can’t perform that action at this time.
0 commit comments