Skip to content

Commit 99b79fc

Browse files
committed
Jenkinsfile updated
1 parent 2a8d257 commit 99b79fc

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Jenkinsfile

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
name: Secret Value found!!
3+
on:
4+
push:
5+
public:
6+
jobs:
7+
scan:
8+
name: gitleaks
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4.2.2
13+
- name: Install the gitleaks
14+
run: wget https://github.com/zricethezav/gitleaks/releases/download/v8.15.2/gitleaks_8.15.2_linux_x64.tar.gz
15+
shell: pwsh
16+
- name: Extract the tar file
17+
run: tar xzvf gitleaks_8.15.2_linux_x64.tar.gz
18+
- name: Generate the report
19+
id: gitleaks
20+
run: $GITHUB_WORKSPACE/gitleaks detect -s $GITHUB_WORKSPACE -f json -r $GITHUB_WORKSPACE/leaksreport.json
21+
shell: bash
22+
continue-on-error: true
23+
- name: Setup NuGet.exe
24+
if: steps.gitleaks.outcome != 'success'
25+
uses: nuget/setup-nuget@v1
26+
with:
27+
nuget-version: latest
28+
- name: Install the dotnet
29+
if: steps.gitleaks.outcome != 'success'
30+
uses: actions/setup-dotnet@v3
31+
with:
32+
dotnet-version: '3.1.x'
33+
- name: Install the report tool packages
34+
if: steps.gitleaks.outcome != 'success'
35+
run: |
36+
nuget install "Syncfusion.Email" -source ${{ secrets.NexusFeedLink }} -ExcludeVersion
37+
dir $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1
38+
dotnet $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1/GitleaksReportMail.dll ${{ secrets.CITEAMCREDENTIALS }} "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" ${{ secrets.ORGANIZATIONNAME }}
39+
exit 1

0 commit comments

Comments
 (0)