Skip to content
Snippets Groups Projects
Commit 4b103e54 authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

fix cicd vulnerability

parent 61151472
No related branches found
No related tags found
No related merge requests found
...@@ -63,15 +63,19 @@ register package: ...@@ -63,15 +63,19 @@ register package:
); );
' '
# Remove credentials from Package.toml files # Sanitize the Package.toml files after registration
- find /tmp/registry -name 'Package.toml' -exec sed -i 's|https://.*@|https://|g' {} \; - find /tmp/registry -name 'Package.toml' -exec sed -i 's|https://.*@|https://|g' {} \;
# Stage and commit sanitized changes # Check for changes and commit sanitized updates if any
- | - |
cd /tmp/registry cd /tmp/registry
git add . if ! git diff --quiet; then
git commit -m "Sanitize Package.toml: Remove secrets from repo field" git add .
git commit -m "Sanitize Package.toml: Remove secrets from repo field"
else
echo "No changes detected, skipping commit."
fi
# Push changes to the registry # Push changes to the registry
- | - |
cd /tmp/registry cd /tmp/registry
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment