Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
mirror-pool
Commits
1f9fc1a0
Commit
1f9fc1a0
authored
Nov 01, 2020
by
intrigeri
Browse files
GitLab CI: check Python code with the Bandit security linter
parent
852480a0
Pipeline
#75
passed with stage
in 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
1f9fc1a0
...
...
@@ -8,6 +8,12 @@ variables:
PYTHON_SCRIPTS
:
bin/dns-pool bin/email-addresses bin/geoip bin/stats
SHELL_SCRIPTS
:
bin/validate-config
bandit
:
script
:
-
apt-get -qy install python3-bandit
-
bandit --version
-
bandit --configfile .bandit.yml --format txt $PYTHON_SCRIPTS
flake8
:
script
:
-
apt-get -qy install flake8
...
...
bin/stats
View file @
1f9fc1a0
...
...
@@ -25,6 +25,6 @@ if __name__ == "__main__":
.
format
(
count
=
len
(
mirrors
)
-
count_with_email_address
(
mirrors
)))
print
()
print
(
" - GeoIP:"
)
geoip_output
=
subprocess
.
check_output
(
'./bin/geoip'
,
geoip_output
=
subprocess
.
check_output
(
'./bin/geoip'
,
# nosec
universal_newlines
=
True
)
print
(
" "
+
"
\n
"
.
join
(
geoip_output
.
split
(
"
\n
"
)))
Write
Preview
Supports
Markdown
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