Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ on:

jobs:

scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


build-test:
name: Build & run UI Tests (${{ matrix.os }}, node-${{ matrix.node-version }})
timeout-minutes: 60
Expand Down
27 changes: 27 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "gitleaks",
"type": "shell",
"command": "docker run -v ${PWD}:/path gitleaks:latest dir /path -v --no-color | awk 'BEGIN { ORS=\"\" } /^Finding:/ {if (NR>1) print \"\\n\"; printf \"FINDING=%s|||\", substr($0, index($0,$2)) } /^Secret:/ {printf \"SECRET=%s|||\", $2} /^RuleID:/ {printf \"RULEID=%s|||\", $2} /^Entropy:/ {printf \"ENTROPY=%s|||\", $2} /^File:/ {printf \"FILE=%s|||\", $2} /^Line:/ {printf \"LINE=%s|||\", $2} /^Fingerprint:/ {printf \"FINGERPRINT=%s|||\", $2}'",
"problemMatcher": {
"source": "gitleaks",
"owner": "gitleaks",
"fileLocation": [
"relative", "${workspaceFolder}"
],
"pattern": [
{
"regexp": "^FINDING=(.*?)[|]{3}SECRET=(.*?)[|]{3}RULEID=(.*?)[|]{3}ENTROPY=(.*?)[|]{3}FILE=\/path\/(.+)[|]{3}LINE=(.*?)[|]{3}FINGERPRINT=(.*?)[|]{3}$",
"file": 5,
"line": 6,
"message": 1
}
]
}
}
]
}
16 changes: 16 additions & 0 deletions test-gitleaks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This is a test - the following secret is fake

setup the following secret as an environment variable:

export SUPER_DUPER_SECRET="wibC7fyqq1"

BTW, looking for a good password? Here are a few!

"`_]TN)/+T`jp?19", "kW6hh*vu6wcF3g;", "gRoJ6ibcVv[zp}D", "8?JRgr}Kx-V('$aN-Ml_&"x%5CL)?<", "v9w1cRg4PUIVDyrSN63UTXkCgQRnxT5C"



one more secret!

ghp_ypwNi08kJx9H3YblGrkNFfqGaxat7d3cMPen

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Gitleaks has detected a secret with rule-id github-pat in commit 16e0cc2.
If this secret is a true positive, please rotate the secret ASAP.

If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.

echo 16e0cc282f0bfc9a4973947b3fef878ad7309fe0:test-gitleaks.txt:github-pat:15 >> .gitleaksignore

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Gitleaks has detected a secret with rule-id github-pat in commit 65dd80c.
If this secret is a true positive, please rotate the secret ASAP.

If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.

echo 65dd80c38cccee6b096ac63f3a71abd556fd94cf:test-gitleaks.txt:github-pat:15 >> .gitleaksignore