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
7c001e9e
Commit
7c001e9e
authored
Oct 15, 2020
by
Saikat Sarkar
Committed by
Markus Koller
Oct 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add MobSF in SAST vendor template
parent
db4b71ae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
22 deletions
+72
-22
ee/changelogs/unreleased/sast_mobile.yml
ee/changelogs/unreleased/sast_mobile.yml
+5
-0
ee/spec/lib/gitlab/ci/templates/sast_gitlab_ci_yaml_spec.rb
ee/spec/lib/gitlab/ci/templates/sast_gitlab_ci_yaml_spec.rb
+25
-21
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
+42
-1
No files found.
ee/changelogs/unreleased/sast_mobile.yml
0 → 100644
View file @
7c001e9e
---
title
:
Add MobSF in SAST vendor template
merge_request
:
45291
author
:
type
:
added
ee/spec/lib/gitlab/ci/templates/sast_gitlab_ci_yaml_spec.rb
View file @
7c001e9e
...
@@ -36,6 +36,7 @@ RSpec.describe 'SAST.gitlab-ci.yml' do
...
@@ -36,6 +36,7 @@ RSpec.describe 'SAST.gitlab-ci.yml' do
using
RSpec
::
Parameterized
::
TableSyntax
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:case_name
,
:files
,
:variables
,
:include_build_names
)
do
where
(
:case_name
,
:files
,
:variables
,
:include_build_names
)
do
'Android'
|
{
'AndroidManifest.xml'
=>
''
,
'a.java'
=>
''
}
|
{
'SAST_EXPERIMENTAL_FEATURES'
=>
'true'
}
|
%w(mobsf-android-sast)
'Apex'
|
{
'app.cls'
=>
''
}
|
{}
|
%w(pmd-apex-sast)
'Apex'
|
{
'app.cls'
=>
''
}
|
{}
|
%w(pmd-apex-sast)
'C'
|
{
'app.c'
=>
''
}
|
{}
|
%w(flawfinder-sast)
'C'
|
{
'app.c'
=>
''
}
|
{}
|
%w(flawfinder-sast)
'C++'
|
{
'app.cpp'
=>
''
}
|
{}
|
%w(flawfinder-sast)
'C++'
|
{
'app.cpp'
=>
''
}
|
{}
|
%w(flawfinder-sast)
...
@@ -43,7 +44,10 @@ RSpec.describe 'SAST.gitlab-ci.yml' do
...
@@ -43,7 +44,10 @@ RSpec.describe 'SAST.gitlab-ci.yml' do
'Elixir'
|
{
'mix.exs'
=>
''
}
|
{}
|
%w(sobelow-sast)
'Elixir'
|
{
'mix.exs'
=>
''
}
|
{}
|
%w(sobelow-sast)
'Golang'
|
{
'main.go'
=>
''
}
|
{}
|
%w(gosec-sast)
'Golang'
|
{
'main.go'
=>
''
}
|
{}
|
%w(gosec-sast)
'Groovy'
|
{
'app.groovy'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'Groovy'
|
{
'app.groovy'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'iOS'
|
{
'a.xcodeproj/x.pbxproj'
=>
''
}
|
{
'SAST_EXPERIMENTAL_FEATURES'
=>
'true'
}
|
%w(mobsf-ios-sast)
'Java'
|
{
'app.java'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'Java'
|
{
'app.java'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'Java with MobSF'
|
{
'app.java'
=>
''
}
|
{
'SAST_EXPERIMENTAL_FEATURES'
=>
'true'
}
|
%w(spotbugs-sast)
'Java without MobSF'
|
{
'AndroidManifest.xml'
=>
''
,
'a.java'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'Javascript'
|
{
'app.js'
=>
''
}
|
{}
|
%w(eslint-sast)
'Javascript'
|
{
'app.js'
=>
''
}
|
{}
|
%w(eslint-sast)
'JSX'
|
{
'app.jsx'
=>
''
}
|
{}
|
%w(eslint-sast)
'JSX'
|
{
'app.jsx'
=>
''
}
|
{}
|
%w(eslint-sast)
'Javascript Node'
|
{
'package.json'
=>
''
}
|
{}
|
%w(nodejs-scan-sast)
'Javascript Node'
|
{
'package.json'
=>
''
}
|
{}
|
%w(nodejs-scan-sast)
...
...
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
View file @
7c001e9e
...
@@ -9,7 +9,7 @@ variables:
...
@@ -9,7 +9,7 @@ variables:
# (SAST, Dependency Scanning, ...)
# (SAST, Dependency Scanning, ...)
SECURE_ANALYZERS_PREFIX
:
"
registry.gitlab.com/gitlab-org/security-products/analyzers"
SECURE_ANALYZERS_PREFIX
:
"
registry.gitlab.com/gitlab-org/security-products/analyzers"
SAST_DEFAULT_ANALYZERS
:
"
bandit,
brakeman,
gosec,
spotbugs,
flawfinder,
phpcs-security-audit,
security-code-scan,
nodejs-scan,
eslint,
sobelow,
pmd-apex,
kubesec"
SAST_DEFAULT_ANALYZERS
:
"
bandit,
brakeman,
gosec,
spotbugs,
flawfinder,
phpcs-security-audit,
security-code-scan,
nodejs-scan,
eslint,
sobelow,
pmd-apex,
kubesec
,
mobsf
"
SAST_EXCLUDED_PATHS
:
"
spec,
test,
tests,
tmp"
SAST_EXCLUDED_PATHS
:
"
spec,
test,
tests,
tmp"
SAST_ANALYZER_IMAGE_TAG
:
2
SAST_ANALYZER_IMAGE_TAG
:
2
SCAN_KUBERNETES_MANIFESTS
:
"
false"
SCAN_KUBERNETES_MANIFESTS
:
"
false"
...
@@ -125,6 +125,42 @@ gosec-sast:
...
@@ -125,6 +125,42 @@ gosec-sast:
exists
:
exists
:
-
'
**/*.go'
-
'
**/*.go'
mobsf-android-sast
:
extends
:
.sast-analyzer
services
:
-
name
:
opensecurity/mobile-security-framework-mobsf:latest
alias
:
mobsf
image
:
name
:
"
$SAST_ANALYZER_IMAGE"
variables
:
SAST_ANALYZER_IMAGE
:
"
$SECURE_ANALYZERS_PREFIX/mobsf:$SAST_ANALYZER_IMAGE_TAG"
rules
:
-
if
:
$SAST_DISABLED
when
:
never
-
if
:
$CI_COMMIT_BRANCH &&
$SAST_DEFAULT_ANALYZERS =~ /mobsf/ &&
$SAST_EXPERIMENTAL_FEATURES == 'true'
exists
:
-
'
**/AndroidManifest.xml'
mobsf-ios-sast
:
extends
:
.sast-analyzer
services
:
-
name
:
opensecurity/mobile-security-framework-mobsf:latest
alias
:
mobsf
image
:
name
:
"
$SAST_ANALYZER_IMAGE"
variables
:
SAST_ANALYZER_IMAGE
:
"
$SECURE_ANALYZERS_PREFIX/mobsf:$SAST_ANALYZER_IMAGE_TAG"
rules
:
-
if
:
$SAST_DISABLED
when
:
never
-
if
:
$CI_COMMIT_BRANCH &&
$SAST_DEFAULT_ANALYZERS =~ /mobsf/ &&
$SAST_EXPERIMENTAL_FEATURES == 'true'
exists
:
-
'
**/*.xcodeproj/*'
nodejs-scan-sast
:
nodejs-scan-sast
:
extends
:
.sast-analyzer
extends
:
.sast-analyzer
image
:
image
:
...
@@ -203,6 +239,11 @@ spotbugs-sast:
...
@@ -203,6 +239,11 @@ spotbugs-sast:
variables
:
variables
:
SAST_ANALYZER_IMAGE
:
"
$SECURE_ANALYZERS_PREFIX/spotbugs:$SAST_ANALYZER_IMAGE_TAG"
SAST_ANALYZER_IMAGE
:
"
$SECURE_ANALYZERS_PREFIX/spotbugs:$SAST_ANALYZER_IMAGE_TAG"
rules
:
rules
:
-
if
:
$SAST_DEFAULT_ANALYZERS =~ /mobsf/ &&
$SAST_EXPERIMENTAL_FEATURES == 'true'
exists
:
-
'
**/AndroidManifest.xml'
when
:
never
-
if
:
$SAST_DISABLED
-
if
:
$SAST_DISABLED
when
:
never
when
:
never
-
if
:
$CI_COMMIT_BRANCH &&
-
if
:
$CI_COMMIT_BRANCH &&
...
...
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