Skip to content

Commit

Permalink
Fix #18835 - Suppress RUSTSEC-2020-0071 and RUSTSEC-2020-0159 advisories
Browse files Browse the repository at this point in the history
  • Loading branch information
jumde committed Oct 18, 2021
1 parent 49ec6fb commit 427dd76
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions script/audit_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
os.path.join('vendor', 'brave-extension', 'node_modules'),
]

# Tag @sec-team before adding any advisory to this list
# Ignore these rust advisories
IGNORED_CARGO_ADVISORIES = [
# Remove when:
# https://github.com/chronotope/chrono/issues/602 is resolved
# Tracking issue: https://github.com/brave/brave-browser/issues/18838
'RUSTSEC-2020-0071',
'RUSTSEC-2020-0159'
]

# Use only these (sub)paths for cargo audit.
CARGO_INCLUDE_PATHS = [
os.path.join('build', 'rust'),
Expand Down Expand Up @@ -151,6 +161,9 @@ def cargo_audit_deps(path, args):
cargo_args.append("audit")
cargo_args.append("--file")
cargo_args.append(os.path.join(path, "Cargo.lock"))
for advisory in IGNORED_CARGO_ADVISORIES:
cargo_args.append("--ignore")
cargo_args.append(advisory)

return subprocess.call(cargo_args, env=env)

Expand Down

0 comments on commit 427dd76

Please sign in to comment.