Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Administrator
/
chatgpt.ai-pro.org
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
3
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f20b32c0
authored
2026-07-21 03:23:39 +0000
by
Demsey Cunanan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update .gitlab-ci.yml
1 parent
7ac50497
Pipeline
#38067
for
f20b32c0
passed
in 20 seconds
Changes
1
Pipelines
1
Builds
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
.gitlab-ci.yml
.gitlab-ci.yml
View file @
f20b32c
stages
:
-
security
-
deploy
secret_grep_scan
:
stage
:
security
tags
:
-
chatgpt-prod
script
:
-
|
echo "Scanning for hardcoded AI provider API keys..."
PATTERN='(VUE_APP|VITE|REACT_APP|NEXT_PUBLIC|EXPO_PUBLIC|PUBLIC)_[A-Z0-9_]*(KEY|SECRET|TOKEN|PASSWORD|CREDENTIAL)[A-Z0-9_]*[[:space:]]*[:=]|sk-(proj-)?[A-Za-z0-9_-]{20,}|sk-ant-(api03-)?[A-Za-z0-9_-]{20,}|xai-[A-Za-z0-9]{20,}|AIzaSy[A-Za-z0-9_-]{33}|gsk_[A-Za-z0-9]{20,}|pplx-[A-Za-z0-9]{20,}|hf_[A-Za-z0-9]{30,}'
grep -Ern "$PATTERN" --exclude-dir=.git --exclude-dir=node_modules --exclude-dir=vendor --exclude-dir=dist --exclude-dir=build --exclude-dir=_srv --include='*.js' --include='*.jsx' --include='*.ts' --include='*.tsx' --include='*.vue' --include='*.php' --include='*.html' --include='*.env' --include='*.env.*' . > raw-matches.txt || true
if [ -s raw-matches.txt ]; then
echo "🚨 Hardcoded secret pattern(s) detected. Locations below (values redacted):"
awk -F: '{print $1":"$2}' raw-matches.txt | sort -u > secret-locations.txt
cat secret-locations.txt
echo ""
echo "File and line number are shown above."
echo "Full match details (values redacted) are saved as an artifact."
sed -E \
-e 's/(sk-(proj-)?[A-Za-z0-9_-]{6})[A-Za-z0-9_-]+/\1[REDACTED]/g' \
-e 's/(sk-ant-(api03-)?[A-Za-z0-9_-]{6})[A-Za-z0-9_-]+/\1[REDACTED]/g' \
-e 's/(xai-[A-Za-z0-9]{6})[A-Za-z0-9]+/\1[REDACTED]/g' \
-e 's/(AIzaSy[A-Za-z0-9_-]{6})[A-Za-z0-9_-]+/\1[REDACTED]/g' \
-e 's/(gsk_[A-Za-z0-9]{6})[A-Za-z0-9]+/\1[REDACTED]/g' \
-e 's/(pplx-[A-Za-z0-9]{6})[A-Za-z0-9]+/\1[REDACTED]/g' \
-e 's/(hf_[A-Za-z0-9]{6})[A-Za-z0-9]+/\1[REDACTED]/g' \
raw-matches.txt > secret-locations-detail.txt
rm -f raw-matches.txt
echo "Hardcoded secrets detected. Failing pipeline."
exit 1
else
echo "No hardcoded secret patterns found."
rm -f raw-matches.txt
fi
artifacts
:
name
:
"
secret-scan-locations"
paths
:
-
secret-locations.txt
-
secret-locations-detail.txt
when
:
on_failure
expire_in
:
7 days
only
:
-
branches
allow_failure
:
false
deploy_prod
:
stage
:
deploy
script
:
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment