forked from stakater/Reloader
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.63 KB
/
sast.yaml
File metadata and controls
89 lines (75 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: SAST and Linting
on:
push:
branches:
- main
- master
jobs:
huskyci:
name: HuskyCI Security Check
runs-on: [self-hosted]
env:
HUSKYCI_CLIENT_API_ADDR: "${{ secrets.HUSKYCI_CLIENT_API_ADDR }}"
HUSKYCI_CLIENT_API_USE_HTTPS: false
HUSKYCI_CLIENT_REPO_URL: git@github.com:${{ github.repository }}.git
HUSKYCI_CLIENT_REPO_BRANCH: "master"
HUSKYCI_CLIENT_TOKEN: "${{ secrets.HUSKYCI_CLIENT_TOKEN }}"
HUSKYCI_CLIENT_URL: "git@github.com/githubanotaai/huskyci-api.git"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '^1.19'
- run: go version
- name: Downloading and installing tools
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends make tcl-dev gettext libcurl4-openssl-dev openssh-client git
sudo curl -SL https://github.com/docker/compose/releases/download/v2.32.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: HuskyCI Client Download, Build and Run
run: |
wget -O - https://github.com/githubanotaai/huskyci-api/archive/main.tar.gz | tar xz --strip=1
cd client/cmd
go build -ldflags "-s -w" -o huskyci-client main.go
git config --global --add safe.directory /__w/huskyci-api/huskyci-api
chmod +x huskyci-client
./huskyci-client
- name: Debug SonarQube JSON File
if: ${{ !cancelled() }}
run: cat client/cmd/huskyCI/sonarqube.json
- name: Upload SonarQube Artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: sonarqube
path: client/cmd/huskyCI/sonarqube.json
sonarqube:
name: Sonarqube Check
if: ${{ !cancelled() }}
needs: huskyci
runs-on: [self-hosted]
env: {}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download SonarQube Artifact
uses: actions/download-artifact@v4
with:
name: sonarqube
- name: Debug SonarQube JSON File
if: ${{ !cancelled() }}
run: cat ./sonarqube.json
- name: Run SonarQube Scan
uses: sonarsource/sonarqube-scan-action@v3
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.externalIssuesReportPaths=sonarqube.json