@codacy/tools-bandit-1 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/index.js +30 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -77,6 +77,16 @@ pip install bandit==1.8.3
|
|
|
77
77
|
`crypto_request_no_cert_validation` plugin inspects both libraries, so an httpx-only repo
|
|
78
78
|
would otherwise lose the `verify=False` check.
|
|
79
79
|
|
|
80
|
+
Three of these gates are inert, and **deliberately kept anyway**: `B320`, `B410` (lxml) and
|
|
81
|
+
`B414` (pycryptodome) are still in Codacy's pattern catalog but Bandit 1.8.3 no longer
|
|
82
|
+
registers the checks, so they can never fire (`blacklists/calls.py`: "skipped B320 as the
|
|
83
|
+
check for a call to lxml.etree has been removed"; `blacklists/imports.py`: the same for
|
|
84
|
+
`B410`; `B414` is simply absent from `gen_blacklist()`). `mapping-drift.test.ts` cannot see
|
|
85
|
+
this — it compares against Codacy's catalog, not the installed tool. Dropping the mappings
|
|
86
|
+
would make three default-on High/Security patterns universal again and write them into every
|
|
87
|
+
Python repo's config, so the gate is the lesser evil until the catalog catches up. See
|
|
88
|
+
`docs/tech-debt.md`.
|
|
89
|
+
|
|
80
90
|
- Bandit requires Python 3 as a runtime. The adapter uses an isolated venv at `~/.codacy/runtimes/bandit-1/venv/`.
|
|
81
91
|
- Exit code 0 = no findings, 1 = findings found (normal), >1 = error.
|
|
82
92
|
- `col_offset` in bandit output is 0-based; the adapter adds 1 for the 1-based Issue model.
|
package/dist/index.js
CHANGED
|
@@ -139,7 +139,8 @@ var patterns_default = [
|
|
|
139
139
|
title: "Enforce timeout parameter in requests calls",
|
|
140
140
|
enabled: true,
|
|
141
141
|
languages: ["Python"],
|
|
142
|
-
parameters: []
|
|
142
|
+
parameters: [],
|
|
143
|
+
tags: ["lib:httpx", "lib:requests"]
|
|
143
144
|
},
|
|
144
145
|
{
|
|
145
146
|
id: "Bandit_B201",
|
|
@@ -148,7 +149,8 @@ var patterns_default = [
|
|
|
148
149
|
title: "Avoid Running Flask App with Debug Mode Enabled",
|
|
149
150
|
enabled: true,
|
|
150
151
|
languages: ["Python"],
|
|
151
|
-
parameters: []
|
|
152
|
+
parameters: [],
|
|
153
|
+
tags: ["fwk:flask"]
|
|
152
154
|
},
|
|
153
155
|
{
|
|
154
156
|
id: "Bandit_B202",
|
|
@@ -229,7 +231,8 @@ var patterns_default = [
|
|
|
229
231
|
title: "Avoid use of mark_safe()",
|
|
230
232
|
enabled: true,
|
|
231
233
|
languages: ["Python"],
|
|
232
|
-
parameters: []
|
|
234
|
+
parameters: [],
|
|
235
|
+
tags: ["fwk:django"]
|
|
233
236
|
},
|
|
234
237
|
{
|
|
235
238
|
id: "Bandit_B309",
|
|
@@ -499,7 +502,8 @@ var patterns_default = [
|
|
|
499
502
|
title: "Avoid Importing PyCrypto Library",
|
|
500
503
|
enabled: true,
|
|
501
504
|
languages: ["Python"],
|
|
502
|
-
parameters: []
|
|
505
|
+
parameters: [],
|
|
506
|
+
tags: ["lib:pycrypto"]
|
|
503
507
|
},
|
|
504
508
|
{
|
|
505
509
|
id: "Bandit_B414",
|
|
@@ -526,7 +530,8 @@ var patterns_default = [
|
|
|
526
530
|
title: "Avoid disabling SSL certificate validation in requests",
|
|
527
531
|
enabled: true,
|
|
528
532
|
languages: ["Python"],
|
|
529
|
-
parameters: []
|
|
533
|
+
parameters: [],
|
|
534
|
+
tags: ["lib:httpx", "lib:requests"]
|
|
530
535
|
},
|
|
531
536
|
{
|
|
532
537
|
id: "Bandit_B502",
|
|
@@ -571,7 +576,8 @@ var patterns_default = [
|
|
|
571
576
|
title: "Avoid Unsafe Use of yaml.load",
|
|
572
577
|
enabled: true,
|
|
573
578
|
languages: ["Python"],
|
|
574
|
-
parameters: []
|
|
579
|
+
parameters: [],
|
|
580
|
+
tags: ["lib:pyyaml"]
|
|
575
581
|
},
|
|
576
582
|
{
|
|
577
583
|
id: "Bandit_B507",
|
|
@@ -580,7 +586,8 @@ var patterns_default = [
|
|
|
580
586
|
title: "Avoid Disabling SSH Host Key Verification",
|
|
581
587
|
enabled: true,
|
|
582
588
|
languages: ["Python"],
|
|
583
|
-
parameters: []
|
|
589
|
+
parameters: [],
|
|
590
|
+
tags: ["lib:paramiko"]
|
|
584
591
|
},
|
|
585
592
|
{
|
|
586
593
|
id: "Bandit_B508",
|
|
@@ -589,7 +596,8 @@ var patterns_default = [
|
|
|
589
596
|
title: "Avoid using insecure SNMP versions",
|
|
590
597
|
enabled: true,
|
|
591
598
|
languages: ["Python"],
|
|
592
|
-
parameters: []
|
|
599
|
+
parameters: [],
|
|
600
|
+
tags: ["lib:pysnmp"]
|
|
593
601
|
},
|
|
594
602
|
{
|
|
595
603
|
id: "Bandit_B509",
|
|
@@ -598,7 +606,8 @@ var patterns_default = [
|
|
|
598
606
|
title: "Avoid Weak SNMP Cryptography",
|
|
599
607
|
enabled: true,
|
|
600
608
|
languages: ["Python"],
|
|
601
|
-
parameters: []
|
|
609
|
+
parameters: [],
|
|
610
|
+
tags: ["lib:pysnmp"]
|
|
602
611
|
},
|
|
603
612
|
{
|
|
604
613
|
id: "Bandit_B601",
|
|
@@ -607,7 +616,8 @@ var patterns_default = [
|
|
|
607
616
|
title: "Detect Shell Injection Vulnerabilities in Paramiko exec_command",
|
|
608
617
|
enabled: true,
|
|
609
618
|
languages: ["Python"],
|
|
610
|
-
parameters: []
|
|
619
|
+
parameters: [],
|
|
620
|
+
tags: ["lib:paramiko"]
|
|
611
621
|
},
|
|
612
622
|
{
|
|
613
623
|
id: "Bandit_B602",
|
|
@@ -688,7 +698,8 @@ var patterns_default = [
|
|
|
688
698
|
title: "Avoid Potential SQL Injection in Django extra() Function",
|
|
689
699
|
enabled: true,
|
|
690
700
|
languages: ["Python"],
|
|
691
|
-
parameters: []
|
|
701
|
+
parameters: [],
|
|
702
|
+
tags: ["fwk:django"]
|
|
692
703
|
},
|
|
693
704
|
{
|
|
694
705
|
id: "Bandit_B611",
|
|
@@ -697,7 +708,8 @@ var patterns_default = [
|
|
|
697
708
|
title: "Avoid Use of RawSQL Function in Django",
|
|
698
709
|
enabled: true,
|
|
699
710
|
languages: ["Python"],
|
|
700
|
-
parameters: []
|
|
711
|
+
parameters: [],
|
|
712
|
+
tags: ["fwk:django"]
|
|
701
713
|
},
|
|
702
714
|
{
|
|
703
715
|
id: "Bandit_B612",
|
|
@@ -744,7 +756,8 @@ var patterns_default = [
|
|
|
744
756
|
title: "Avoid disabling autoescaping in Jinja2 templates",
|
|
745
757
|
enabled: true,
|
|
746
758
|
languages: ["Python"],
|
|
747
|
-
parameters: []
|
|
759
|
+
parameters: [],
|
|
760
|
+
tags: ["fwk:flask", "lib:jinja2"]
|
|
748
761
|
},
|
|
749
762
|
{
|
|
750
763
|
id: "Bandit_B702",
|
|
@@ -753,7 +766,8 @@ var patterns_default = [
|
|
|
753
766
|
title: "Detect Use of Mako Templates",
|
|
754
767
|
enabled: true,
|
|
755
768
|
languages: ["Python"],
|
|
756
|
-
parameters: []
|
|
769
|
+
parameters: [],
|
|
770
|
+
tags: ["lib:mako"]
|
|
757
771
|
},
|
|
758
772
|
{
|
|
759
773
|
id: "Bandit_B703",
|
|
@@ -762,7 +776,8 @@ var patterns_default = [
|
|
|
762
776
|
title: "Avoid Potential XSS with django mark_safe Function",
|
|
763
777
|
enabled: true,
|
|
764
778
|
languages: ["Python"],
|
|
765
|
-
parameters: []
|
|
779
|
+
parameters: [],
|
|
780
|
+
tags: ["fwk:django"]
|
|
766
781
|
},
|
|
767
782
|
{
|
|
768
783
|
id: "Bandit_B704",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codacy/tools-bandit-1",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Bandit adapter — CLI-mode Python security linter",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@codacy/tooling": "0.
|
|
11
|
+
"@codacy/tooling": "0.21.0"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"author": "Codacy <support@codacy.com> (https://www.codacy.com)",
|