Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
14b09495
Commit
14b09495
authored
Jan 30, 2020
by
Zach Rice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load env vars with -e in sast template
parent
691b83eb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
changelogs/unreleased/24108-fix-sast-multiline.yml
changelogs/unreleased/24108-fix-sast-multiline.yml
+5
-0
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
+2
-5
No files found.
changelogs/unreleased/24108-fix-sast-multiline.yml
0 → 100644
View file @
14b09495
---
title
:
Fix multiline issue when loading env vars from DinD in SAST
merge_request
:
24108
author
:
type
:
fixed
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
View file @
14b09495
...
@@ -37,11 +37,8 @@ sast:
...
@@ -37,11 +37,8 @@ sast:
fi
fi
fi
fi
-
|
-
|
printenv | grep -E '^(DOCKER_|CI|GITLAB_|FF_|HOME|PWD|OLDPWD|PATH|SHLVL|HOSTNAME)' | cut -d'=' -f1 | \
ENVS=`printenv | grep -vE '^(DOCKER_|CI|GITLAB_|FF_|HOME|PWD|OLDPWD|PATH|SHLVL|HOSTNAME)' | sed -n '/^[^\t]/s/=.*//p' | sed '/^$/d' | sed 's/^/-e /g' | tr '\n' ' '`
(while IFS='\\n' read -r VAR; do unset -v "$VAR"; done; /bin/printenv > .env)
docker run "$ENVS" \
-
|
docker run \
--env-file .env \
--volume "$PWD:/code" \
--volume "$PWD:/code" \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /var/run/docker.sock:/var/run/docker.sock \
"registry.gitlab.com/gitlab-org/security-products/sast:$SAST_VERSION" /app/bin/run /code
"registry.gitlab.com/gitlab-org/security-products/sast:$SAST_VERSION" /app/bin/run /code
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment