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
Hide 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,27 +36,31 @@ RSpec.describe 'SAST.gitlab-ci.yml' do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:case_name
,
:files
,
:variables
,
:include_build_names
)
do
'Apex'
|
{
'app.cls'
=>
''
}
|
{}
|
%w(pmd-apex-sast)
'C'
|
{
'app.c'
=>
''
}
|
{}
|
%w(flawfinder-sast)
'C++'
|
{
'app.cpp'
=>
''
}
|
{}
|
%w(flawfinder-sast)
'C#'
|
{
'app.csproj'
=>
''
}
|
{}
|
%w(security-code-scan-sast)
'Elixir'
|
{
'mix.exs'
=>
''
}
|
{}
|
%w(sobelow-sast)
'Golang'
|
{
'main.go'
=>
''
}
|
{}
|
%w(gosec-sast)
'Groovy'
|
{
'app.groovy'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'Java'
|
{
'app.java'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'Javascript'
|
{
'app.js'
=>
''
}
|
{}
|
%w(eslint-sast)
'JSX'
|
{
'app.jsx'
=>
''
}
|
{}
|
%w(eslint-sast)
'Javascript Node'
|
{
'package.json'
=>
''
}
|
{}
|
%w(nodejs-scan-sast)
'HTML'
|
{
'index.html'
=>
''
}
|
{}
|
%w(eslint-sast)
'Kubernetes Manifests'
|
{
'Chart.yaml'
=>
''
}
|
{
'SCAN_KUBERNETES_MANIFESTS'
=>
'true'
}
|
%w(kubesec-sast)
'Multiple languages'
|
{
'app.java'
=>
''
,
'app.js'
=>
''
}
|
{}
|
%w(eslint-sast spotbugs-sast)
'PHP'
|
{
'app.php'
=>
''
}
|
{}
|
%w(phpcs-security-audit-sast)
'Python'
|
{
'app.py'
=>
''
}
|
{}
|
%w(bandit-sast)
'Ruby'
|
{
'config/routes.rb'
=>
''
}
|
{}
|
%w(brakeman-sast)
'Scala'
|
{
'app.scala'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'Typescript'
|
{
'app.ts'
=>
''
}
|
{}
|
%w(eslint-sast)
'Typescript JSX'
|
{
'app.tsx'
=>
''
}
|
{}
|
%w(eslint-sast)
'Visual Basic'
|
{
'app.vbproj'
=>
''
}
|
{}
|
%w(security-code-scan-sast)
'Android'
|
{
'AndroidManifest.xml'
=>
''
,
'a.java'
=>
''
}
|
{
'SAST_EXPERIMENTAL_FEATURES'
=>
'true'
}
|
%w(mobsf-android-sast)
'Apex'
|
{
'app.cls'
=>
''
}
|
{}
|
%w(pmd-apex-sast)
'C'
|
{
'app.c'
=>
''
}
|
{}
|
%w(flawfinder-sast)
'C++'
|
{
'app.cpp'
=>
''
}
|
{}
|
%w(flawfinder-sast)
'C#'
|
{
'app.csproj'
=>
''
}
|
{}
|
%w(security-code-scan-sast)
'Elixir'
|
{
'mix.exs'
=>
''
}
|
{}
|
%w(sobelow-sast)
'Golang'
|
{
'main.go'
=>
''
}
|
{}
|
%w(gosec-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 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)
'JSX'
|
{
'app.jsx'
=>
''
}
|
{}
|
%w(eslint-sast)
'Javascript Node'
|
{
'package.json'
=>
''
}
|
{}
|
%w(nodejs-scan-sast)
'HTML'
|
{
'index.html'
=>
''
}
|
{}
|
%w(eslint-sast)
'Kubernetes Manifests'
|
{
'Chart.yaml'
=>
''
}
|
{
'SCAN_KUBERNETES_MANIFESTS'
=>
'true'
}
|
%w(kubesec-sast)
'Multiple languages'
|
{
'app.java'
=>
''
,
'app.js'
=>
''
}
|
{}
|
%w(eslint-sast spotbugs-sast)
'PHP'
|
{
'app.php'
=>
''
}
|
{}
|
%w(phpcs-security-audit-sast)
'Python'
|
{
'app.py'
=>
''
}
|
{}
|
%w(bandit-sast)
'Ruby'
|
{
'config/routes.rb'
=>
''
}
|
{}
|
%w(brakeman-sast)
'Scala'
|
{
'app.scala'
=>
''
}
|
{}
|
%w(spotbugs-sast)
'Typescript'
|
{
'app.ts'
=>
''
}
|
{}
|
%w(eslint-sast)
'Typescript JSX'
|
{
'app.tsx'
=>
''
}
|
{}
|
%w(eslint-sast)
'Visual Basic'
|
{
'app.vbproj'
=>
''
}
|
{}
|
%w(security-code-scan-sast)
end
with_them
do
...
...
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
View file @
7c001e9e
...
...
@@ -9,7 +9,7 @@ variables:
# (SAST, Dependency Scanning, ...)
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_ANALYZER_IMAGE_TAG
:
2
SCAN_KUBERNETES_MANIFESTS
:
"
false"
...
...
@@ -125,6 +125,42 @@ gosec-sast:
exists
:
-
'
**/*.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
:
extends
:
.sast-analyzer
image
:
...
...
@@ -203,6 +239,11 @@ spotbugs-sast:
variables
:
SAST_ANALYZER_IMAGE
:
"
$SECURE_ANALYZERS_PREFIX/spotbugs:$SAST_ANALYZER_IMAGE_TAG"
rules
:
-
if
:
$SAST_DEFAULT_ANALYZERS =~ /mobsf/ &&
$SAST_EXPERIMENTAL_FEATURES == 'true'
exists
:
-
'
**/AndroidManifest.xml'
when
:
never
-
if
:
$SAST_DISABLED
when
:
never
-
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