Skip to content

Commit

Permalink
style: Add nosec comments to ignore bandit warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Mar 6, 2019
1 parent c0034e2 commit 10bc3f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/git_changelog/build.py
Expand Up @@ -2,7 +2,7 @@

import sys
from datetime import datetime
from subprocess import check_output
from subprocess import check_output # nosec

from .providers import GitHub, GitLab
from .style import AngularStyle, AtomStyle, BasicStyle, CommitStyle
Expand Down Expand Up @@ -205,7 +205,7 @@ def __init__(self, repository, provider=None, style=None):

def get_remote_url(self):
git_url = (
check_output(["git", "config", "--get", "remote.origin.url"], cwd=self.repository)
check_output(["git", "config", "--get", "remote.origin.url"], cwd=self.repository) # nosec
.decode("utf-8")
.rstrip("\n")
)
Expand All @@ -216,9 +216,9 @@ def get_remote_url(self):
return git_url

def get_log(self):
return check_output(["git", "log", "--date=unix", "--format=" + self.FORMAT], cwd=self.repository).decode(
"utf-8"
)
return check_output(
["git", "log", "--date=unix", "--format=" + self.FORMAT], cwd=self.repository # nosec
).decode("utf-8")

def parse_commits(self):
lines = self.raw_log.split("\n")
Expand Down
2 changes: 1 addition & 1 deletion src/git_changelog/templates/__init__.py
Expand Up @@ -9,7 +9,7 @@ def get_path():


def get_env(path):
return Environment(loader=FileSystemLoader(path))
return Environment(loader=FileSystemLoader(path)) # nosec


def get_custom_template(path):
Expand Down

0 comments on commit 10bc3f4

Please sign in to comment.