Annie Voigt commited on
Commit
47ce02e
·
1 Parent(s): 3255244

chore(security): rebaseline B108 after moving /tmp fallbacks to core/paths.py

Browse files

The three intentional /tmp fallback dirs (RNA_*_DIR working paths) moved from
src/tools/rna/_base.py to src/core/paths.py in 9c88c1e. Regenerate the bandit
baseline (net-zero: same 3 accepted B108 relocated, count unchanged 16) and
update the ACCEPTED-FINDINGS.md path reference. No new accepted finding class.

security/ACCEPTED-FINDINGS.md CHANGED
@@ -47,7 +47,7 @@ these do not fail the build but any **new** finding does. Regenerate only via
47
  | Test | Count | Where | Why accepted |
48
  |------|-------|-------|--------------|
49
  | **B104** hardcoded_bind_all_interfaces | 1 | `src/managers/execution/sandbox/launchers.py:220` | The dev/test `subprocess` launcher binds `0.0.0.0` for the localhost exec-kernel; container prod does not expose it. Not reachable off-host in the deployed model. |
50
- | **B108** hardcoded_tmp_directory | 9 | `src/cache.py`, `src/tools/rna/_base.py`, `src/tools/bulk_rnaseq/_base.py`, `src/tools/bulk_dataset_tools.py`, `src/mcp_server/dependencies/r_dependencies.py`, `launchers.py` | `/tmp/decoupleRpy/**` working dirs. HF Spaces give each container an ephemeral private `/tmp`; these are env-overridable (`RNA_*_DIR`) working paths, not shared-host temp files. |
51
  | **B310** urllib urlopen | 6 | `src/workflows/geo.py`, `src/core/data_io.py`, `src/tools/bulk_rnaseq/_base.py`, `src/tools/bulk_rnaseq/tools.py` | GEO / dataset downloads. The scheme is checked (`http/https/ftp`) before the call; URLs come from vetted manifests in `biodata-registry`, not user input. |
52
 
53
  **Inline `# nosec` suppressions** (not in the baseline; annotated at the call
 
47
  | Test | Count | Where | Why accepted |
48
  |------|-------|-------|--------------|
49
  | **B104** hardcoded_bind_all_interfaces | 1 | `src/managers/execution/sandbox/launchers.py:220` | The dev/test `subprocess` launcher binds `0.0.0.0` for the localhost exec-kernel; container prod does not expose it. Not reachable off-host in the deployed model. |
50
+ | **B108** hardcoded_tmp_directory | 9 | `src/cache.py`, `src/core/paths.py`, `src/tools/bulk_rnaseq/_base.py`, `src/tools/bulk_dataset_tools.py`, `src/mcp_server/dependencies/r_dependencies.py`, `launchers.py` | `/tmp/decoupleRpy/**` working dirs. HF Spaces give each container an ephemeral private `/tmp`; these are env-overridable (`RNA_*_DIR`) working paths, not shared-host temp files. The three `rna`-family fallbacks now live in `src/core/paths.py` (shared by tools + workflows). |
51
  | **B310** urllib urlopen | 6 | `src/workflows/geo.py`, `src/core/data_io.py`, `src/tools/bulk_rnaseq/_base.py`, `src/tools/bulk_rnaseq/tools.py` | GEO / dataset downloads. The scheme is checked (`http/https/ftp`) before the call; URLs come from vetted manifests in `biodata-registry`, not user input. |
52
 
53
  **Inline `# nosec` suppressions** (not in the baseline; annotated at the call
security/bandit-baseline.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "errors": [],
3
- "generated_at": "2026-07-02T19:46:18Z",
4
  "metrics": {
5
  "_totals": {
6
  "CONFIDENCE.HIGH": 31,
@@ -11,7 +11,7 @@
11
  "SEVERITY.LOW": 25,
12
  "SEVERITY.MEDIUM": 16,
13
  "SEVERITY.UNDEFINED": 0,
14
- "loc": 19364,
15
  "nosec": 0,
16
  "skipped_tests": 3
17
  },
@@ -24,7 +24,7 @@
24
  "SEVERITY.LOW": 0,
25
  "SEVERITY.MEDIUM": 0,
26
  "SEVERITY.UNDEFINED": 0,
27
- "loc": 430,
28
  "nosec": 0,
29
  "skipped_tests": 0
30
  },
@@ -54,6 +54,19 @@
54
  "nosec": 0,
55
  "skipped_tests": 0
56
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  "src/core/combine.py": {
58
  "CONFIDENCE.HIGH": 0,
59
  "CONFIDENCE.LOW": 0,
@@ -102,7 +115,20 @@
102
  "SEVERITY.LOW": 1,
103
  "SEVERITY.MEDIUM": 0,
104
  "SEVERITY.UNDEFINED": 0,
105
- "loc": 140,
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  "nosec": 0,
107
  "skipped_tests": 0
108
  },
@@ -115,7 +141,7 @@
115
  "SEVERITY.LOW": 0,
116
  "SEVERITY.MEDIUM": 0,
117
  "SEVERITY.UNDEFINED": 0,
118
- "loc": 35,
119
  "nosec": 0,
120
  "skipped_tests": 0
121
  },
@@ -128,7 +154,7 @@
128
  "SEVERITY.LOW": 0,
129
  "SEVERITY.MEDIUM": 0,
130
  "SEVERITY.UNDEFINED": 0,
131
- "loc": 164,
132
  "nosec": 0,
133
  "skipped_tests": 0
134
  },
@@ -167,7 +193,7 @@
167
  "SEVERITY.LOW": 0,
168
  "SEVERITY.MEDIUM": 0,
169
  "SEVERITY.UNDEFINED": 0,
170
- "loc": 461,
171
  "nosec": 0,
172
  "skipped_tests": 0
173
  },
@@ -180,7 +206,7 @@
180
  "SEVERITY.LOW": 0,
181
  "SEVERITY.MEDIUM": 0,
182
  "SEVERITY.UNDEFINED": 0,
183
- "loc": 216,
184
  "nosec": 0,
185
  "skipped_tests": 0
186
  },
@@ -193,7 +219,7 @@
193
  "SEVERITY.LOW": 0,
194
  "SEVERITY.MEDIUM": 0,
195
  "SEVERITY.UNDEFINED": 0,
196
- "loc": 169,
197
  "nosec": 0,
198
  "skipped_tests": 0
199
  },
@@ -232,7 +258,7 @@
232
  "SEVERITY.LOW": 0,
233
  "SEVERITY.MEDIUM": 0,
234
  "SEVERITY.UNDEFINED": 0,
235
- "loc": 78,
236
  "nosec": 0,
237
  "skipped_tests": 0
238
  },
@@ -284,7 +310,7 @@
284
  "SEVERITY.LOW": 0,
285
  "SEVERITY.MEDIUM": 0,
286
  "SEVERITY.UNDEFINED": 0,
287
- "loc": 20,
288
  "nosec": 0,
289
  "skipped_tests": 0
290
  },
@@ -310,7 +336,7 @@
310
  "SEVERITY.LOW": 0,
311
  "SEVERITY.MEDIUM": 0,
312
  "SEVERITY.UNDEFINED": 0,
313
- "loc": 172,
314
  "nosec": 0,
315
  "skipped_tests": 0
316
  },
@@ -323,7 +349,7 @@
323
  "SEVERITY.LOW": 8,
324
  "SEVERITY.MEDIUM": 2,
325
  "SEVERITY.UNDEFINED": 0,
326
- "loc": 352,
327
  "nosec": 0,
328
  "skipped_tests": 0
329
  },
@@ -336,7 +362,7 @@
336
  "SEVERITY.LOW": 0,
337
  "SEVERITY.MEDIUM": 0,
338
  "SEVERITY.UNDEFINED": 0,
339
- "loc": 221,
340
  "nosec": 0,
341
  "skipped_tests": 0
342
  },
@@ -349,7 +375,7 @@
349
  "SEVERITY.LOW": 0,
350
  "SEVERITY.MEDIUM": 0,
351
  "SEVERITY.UNDEFINED": 0,
352
- "loc": 213,
353
  "nosec": 0,
354
  "skipped_tests": 0
355
  },
@@ -375,7 +401,7 @@
375
  "SEVERITY.LOW": 0,
376
  "SEVERITY.MEDIUM": 0,
377
  "SEVERITY.UNDEFINED": 0,
378
- "loc": 119,
379
  "nosec": 0,
380
  "skipped_tests": 0
381
  },
@@ -388,7 +414,7 @@
388
  "SEVERITY.LOW": 0,
389
  "SEVERITY.MEDIUM": 0,
390
  "SEVERITY.UNDEFINED": 0,
391
- "loc": 45,
392
  "nosec": 0,
393
  "skipped_tests": 0
394
  },
@@ -427,7 +453,7 @@
427
  "SEVERITY.LOW": 0,
428
  "SEVERITY.MEDIUM": 0,
429
  "SEVERITY.UNDEFINED": 0,
430
- "loc": 517,
431
  "nosec": 0,
432
  "skipped_tests": 0
433
  },
@@ -440,7 +466,7 @@
440
  "SEVERITY.LOW": 0,
441
  "SEVERITY.MEDIUM": 0,
442
  "SEVERITY.UNDEFINED": 0,
443
- "loc": 365,
444
  "nosec": 0,
445
  "skipped_tests": 0
446
  },
@@ -453,7 +479,7 @@
453
  "SEVERITY.LOW": 0,
454
  "SEVERITY.MEDIUM": 0,
455
  "SEVERITY.UNDEFINED": 0,
456
- "loc": 96,
457
  "nosec": 0,
458
  "skipped_tests": 0
459
  },
@@ -479,7 +505,7 @@
479
  "SEVERITY.LOW": 0,
480
  "SEVERITY.MEDIUM": 0,
481
  "SEVERITY.UNDEFINED": 0,
482
- "loc": 45,
483
  "nosec": 0,
484
  "skipped_tests": 0
485
  },
@@ -492,7 +518,7 @@
492
  "SEVERITY.LOW": 0,
493
  "SEVERITY.MEDIUM": 0,
494
  "SEVERITY.UNDEFINED": 0,
495
- "loc": 20,
496
  "nosec": 0,
497
  "skipped_tests": 0
498
  },
@@ -505,7 +531,7 @@
505
  "SEVERITY.LOW": 0,
506
  "SEVERITY.MEDIUM": 0,
507
  "SEVERITY.UNDEFINED": 0,
508
- "loc": 244,
509
  "nosec": 0,
510
  "skipped_tests": 0
511
  },
@@ -544,7 +570,7 @@
544
  "SEVERITY.LOW": 0,
545
  "SEVERITY.MEDIUM": 1,
546
  "SEVERITY.UNDEFINED": 0,
547
- "loc": 91,
548
  "nosec": 0,
549
  "skipped_tests": 0
550
  },
@@ -570,7 +596,7 @@
570
  "SEVERITY.LOW": 0,
571
  "SEVERITY.MEDIUM": 0,
572
  "SEVERITY.UNDEFINED": 0,
573
- "loc": 128,
574
  "nosec": 0,
575
  "skipped_tests": 0
576
  },
@@ -583,7 +609,7 @@
583
  "SEVERITY.LOW": 0,
584
  "SEVERITY.MEDIUM": 0,
585
  "SEVERITY.UNDEFINED": 0,
586
- "loc": 109,
587
  "nosec": 0,
588
  "skipped_tests": 0
589
  },
@@ -596,7 +622,7 @@
596
  "SEVERITY.LOW": 0,
597
  "SEVERITY.MEDIUM": 0,
598
  "SEVERITY.UNDEFINED": 0,
599
- "loc": 115,
600
  "nosec": 0,
601
  "skipped_tests": 0
602
  },
@@ -609,7 +635,7 @@
609
  "SEVERITY.LOW": 0,
610
  "SEVERITY.MEDIUM": 0,
611
  "SEVERITY.UNDEFINED": 0,
612
- "loc": 122,
613
  "nosec": 0,
614
  "skipped_tests": 0
615
  },
@@ -635,7 +661,7 @@
635
  "SEVERITY.LOW": 0,
636
  "SEVERITY.MEDIUM": 0,
637
  "SEVERITY.UNDEFINED": 0,
638
- "loc": 110,
639
  "nosec": 0,
640
  "skipped_tests": 0
641
  },
@@ -648,7 +674,7 @@
648
  "SEVERITY.LOW": 0,
649
  "SEVERITY.MEDIUM": 1,
650
  "SEVERITY.UNDEFINED": 0,
651
- "loc": 489,
652
  "nosec": 0,
653
  "skipped_tests": 0
654
  },
@@ -661,7 +687,7 @@
661
  "SEVERITY.LOW": 0,
662
  "SEVERITY.MEDIUM": 0,
663
  "SEVERITY.UNDEFINED": 0,
664
- "loc": 40,
665
  "nosec": 0,
666
  "skipped_tests": 0
667
  },
@@ -674,7 +700,7 @@
674
  "SEVERITY.LOW": 0,
675
  "SEVERITY.MEDIUM": 4,
676
  "SEVERITY.UNDEFINED": 0,
677
- "loc": 364,
678
  "nosec": 0,
679
  "skipped_tests": 0
680
  },
@@ -687,7 +713,7 @@
687
  "SEVERITY.LOW": 0,
688
  "SEVERITY.MEDIUM": 1,
689
  "SEVERITY.UNDEFINED": 0,
690
- "loc": 483,
691
  "nosec": 0,
692
  "skipped_tests": 0
693
  },
@@ -700,7 +726,7 @@
700
  "SEVERITY.LOW": 0,
701
  "SEVERITY.MEDIUM": 0,
702
  "SEVERITY.UNDEFINED": 0,
703
- "loc": 28,
704
  "nosec": 0,
705
  "skipped_tests": 0
706
  },
@@ -713,7 +739,7 @@
713
  "SEVERITY.LOW": 0,
714
  "SEVERITY.MEDIUM": 0,
715
  "SEVERITY.UNDEFINED": 0,
716
- "loc": 776,
717
  "nosec": 0,
718
  "skipped_tests": 0
719
  },
@@ -726,7 +752,7 @@
726
  "SEVERITY.LOW": 0,
727
  "SEVERITY.MEDIUM": 0,
728
  "SEVERITY.UNDEFINED": 0,
729
- "loc": 443,
730
  "nosec": 0,
731
  "skipped_tests": 0
732
  },
@@ -739,7 +765,7 @@
739
  "SEVERITY.LOW": 0,
740
  "SEVERITY.MEDIUM": 0,
741
  "SEVERITY.UNDEFINED": 0,
742
- "loc": 429,
743
  "nosec": 0,
744
  "skipped_tests": 0
745
  },
@@ -752,7 +778,7 @@
752
  "SEVERITY.LOW": 0,
753
  "SEVERITY.MEDIUM": 0,
754
  "SEVERITY.UNDEFINED": 0,
755
- "loc": 311,
756
  "nosec": 0,
757
  "skipped_tests": 0
758
  },
@@ -765,7 +791,7 @@
765
  "SEVERITY.LOW": 0,
766
  "SEVERITY.MEDIUM": 0,
767
  "SEVERITY.UNDEFINED": 0,
768
- "loc": 689,
769
  "nosec": 0,
770
  "skipped_tests": 0
771
  },
@@ -811,13 +837,13 @@
811
  "src/tools/rna/_base.py": {
812
  "CONFIDENCE.HIGH": 0,
813
  "CONFIDENCE.LOW": 0,
814
- "CONFIDENCE.MEDIUM": 3,
815
  "CONFIDENCE.UNDEFINED": 0,
816
  "SEVERITY.HIGH": 0,
817
  "SEVERITY.LOW": 0,
818
- "SEVERITY.MEDIUM": 3,
819
  "SEVERITY.UNDEFINED": 0,
820
- "loc": 115,
821
  "nosec": 0,
822
  "skipped_tests": 0
823
  },
@@ -830,7 +856,7 @@
830
  "SEVERITY.LOW": 0,
831
  "SEVERITY.MEDIUM": 0,
832
  "SEVERITY.UNDEFINED": 0,
833
- "loc": 755,
834
  "nosec": 0,
835
  "skipped_tests": 0
836
  },
@@ -843,7 +869,7 @@
843
  "SEVERITY.LOW": 4,
844
  "SEVERITY.MEDIUM": 0,
845
  "SEVERITY.UNDEFINED": 0,
846
- "loc": 812,
847
  "nosec": 0,
848
  "skipped_tests": 0
849
  },
@@ -856,7 +882,7 @@
856
  "SEVERITY.LOW": 0,
857
  "SEVERITY.MEDIUM": 0,
858
  "SEVERITY.UNDEFINED": 0,
859
- "loc": 498,
860
  "nosec": 0,
861
  "skipped_tests": 0
862
  },
@@ -869,7 +895,7 @@
869
  "SEVERITY.LOW": 0,
870
  "SEVERITY.MEDIUM": 0,
871
  "SEVERITY.UNDEFINED": 0,
872
- "loc": 707,
873
  "nosec": 0,
874
  "skipped_tests": 0
875
  },
@@ -882,7 +908,7 @@
882
  "SEVERITY.LOW": 0,
883
  "SEVERITY.MEDIUM": 0,
884
  "SEVERITY.UNDEFINED": 0,
885
- "loc": 711,
886
  "nosec": 0,
887
  "skipped_tests": 0
888
  },
@@ -947,7 +973,7 @@
947
  "SEVERITY.LOW": 2,
948
  "SEVERITY.MEDIUM": 0,
949
  "SEVERITY.UNDEFINED": 0,
950
- "loc": 222,
951
  "nosec": 0,
952
  "skipped_tests": 0
953
  },
@@ -960,7 +986,7 @@
960
  "SEVERITY.LOW": 0,
961
  "SEVERITY.MEDIUM": 0,
962
  "SEVERITY.UNDEFINED": 0,
963
- "loc": 150,
964
  "nosec": 0,
965
  "skipped_tests": 0
966
  },
@@ -973,7 +999,7 @@
973
  "SEVERITY.LOW": 0,
974
  "SEVERITY.MEDIUM": 0,
975
  "SEVERITY.UNDEFINED": 0,
976
- "loc": 183,
977
  "nosec": 0,
978
  "skipped_tests": 0
979
  },
@@ -999,7 +1025,7 @@
999
  "SEVERITY.LOW": 0,
1000
  "SEVERITY.MEDIUM": 0,
1001
  "SEVERITY.UNDEFINED": 0,
1002
- "loc": 210,
1003
  "nosec": 0,
1004
  "skipped_tests": 0
1005
  },
@@ -1012,7 +1038,7 @@
1012
  "SEVERITY.LOW": 0,
1013
  "SEVERITY.MEDIUM": 0,
1014
  "SEVERITY.UNDEFINED": 0,
1015
- "loc": 244,
1016
  "nosec": 0,
1017
  "skipped_tests": 0
1018
  },
@@ -1025,7 +1051,7 @@
1025
  "SEVERITY.LOW": 0,
1026
  "SEVERITY.MEDIUM": 0,
1027
  "SEVERITY.UNDEFINED": 0,
1028
- "loc": 226,
1029
  "nosec": 0,
1030
  "skipped_tests": 0
1031
  },
@@ -1038,7 +1064,7 @@
1038
  "SEVERITY.LOW": 0,
1039
  "SEVERITY.MEDIUM": 2,
1040
  "SEVERITY.UNDEFINED": 0,
1041
- "loc": 490,
1042
  "nosec": 0,
1043
  "skipped_tests": 0
1044
  },
@@ -1051,7 +1077,7 @@
1051
  "SEVERITY.LOW": 0,
1052
  "SEVERITY.MEDIUM": 0,
1053
  "SEVERITY.UNDEFINED": 0,
1054
- "loc": 277,
1055
  "nosec": 0,
1056
  "skipped_tests": 0
1057
  },
@@ -1064,7 +1090,7 @@
1064
  "SEVERITY.LOW": 0,
1065
  "SEVERITY.MEDIUM": 0,
1066
  "SEVERITY.UNDEFINED": 0,
1067
- "loc": 521,
1068
  "nosec": 0,
1069
  "skipped_tests": 0
1070
  },
@@ -1077,7 +1103,7 @@
1077
  "SEVERITY.LOW": 0,
1078
  "SEVERITY.MEDIUM": 0,
1079
  "SEVERITY.UNDEFINED": 0,
1080
- "loc": 487,
1081
  "nosec": 0,
1082
  "skipped_tests": 0
1083
  },
@@ -1090,7 +1116,7 @@
1090
  "SEVERITY.LOW": 0,
1091
  "SEVERITY.MEDIUM": 0,
1092
  "SEVERITY.UNDEFINED": 0,
1093
- "loc": 560,
1094
  "nosec": 0,
1095
  "skipped_tests": 0
1096
  },
@@ -1103,7 +1129,7 @@
1103
  "SEVERITY.LOW": 6,
1104
  "SEVERITY.MEDIUM": 0,
1105
  "SEVERITY.UNDEFINED": 0,
1106
- "loc": 836,
1107
  "nosec": 0,
1108
  "skipped_tests": 0
1109
  },
@@ -1116,7 +1142,7 @@
1116
  "SEVERITY.LOW": 0,
1117
  "SEVERITY.MEDIUM": 0,
1118
  "SEVERITY.UNDEFINED": 0,
1119
- "loc": 337,
1120
  "nosec": 0,
1121
  "skipped_tests": 0
1122
  },
@@ -1129,7 +1155,7 @@
1129
  "SEVERITY.LOW": 0,
1130
  "SEVERITY.MEDIUM": 0,
1131
  "SEVERITY.UNDEFINED": 0,
1132
- "loc": 139,
1133
  "nosec": 0,
1134
  "skipped_tests": 0
1135
  },
@@ -1142,14 +1168,14 @@
1142
  "SEVERITY.LOW": 0,
1143
  "SEVERITY.MEDIUM": 0,
1144
  "SEVERITY.UNDEFINED": 0,
1145
- "loc": 126,
1146
  "nosec": 0,
1147
  "skipped_tests": 0
1148
  }
1149
  },
1150
  "results": [
1151
  {
1152
- "code": "28 \n29 CACHE_DIR = Path(\"/tmp/decoupleRpy/cache\")\n30 \n",
1153
  "col_offset": 17,
1154
  "end_col_offset": 41,
1155
  "filename": "src/cache.py",
@@ -1160,16 +1186,16 @@
1160
  },
1161
  "issue_severity": "MEDIUM",
1162
  "issue_text": "Probable insecure usage of temp file/directory.",
1163
- "line_number": 29,
1164
  "line_range": [
1165
- 29
1166
  ],
1167
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1168
  "test_id": "B108",
1169
  "test_name": "hardcoded_tmp_directory"
1170
  },
1171
  {
1172
- "code": "78 with tempfile.NamedTemporaryFile(suffix=suffix, delete=False) as tmp:\n79 with urllib.request.urlopen(s) as resp:\n80 while True:\n",
1173
  "col_offset": 13,
1174
  "end_col_offset": 38,
1175
  "filename": "src/core/data_io.py",
@@ -1180,16 +1206,76 @@
1180
  },
1181
  "issue_severity": "MEDIUM",
1182
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1183
- "line_number": 79,
1184
  "line_range": [
1185
- 79
1186
  ],
1187
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1188
  "test_id": "B310",
1189
  "test_name": "blacklist"
1190
  },
1191
  {
1192
- "code": "219 \"--host\",\n220 \"0.0.0.0\",\n221 \"--session-id\",\n222 self.session_id,\n223 ]\n224 \n225 # -- Phase-2 hardening (ADR-0007) --------------------------------------- #\n226 def _hardening(self) -> dict:\n227 \"\"\"Single source of truth for the Phase-2 lockdown, read from env once.\n228 \n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1193
  "col_offset": 12,
1194
  "end_col_offset": 21,
1195
  "filename": "src/managers/execution/sandbox/launchers.py",
@@ -1200,23 +1286,23 @@
1200
  },
1201
  "issue_severity": "MEDIUM",
1202
  "issue_text": "Possible binding to all interfaces.",
1203
- "line_number": 220,
1204
  "line_range": [
 
 
 
 
 
 
1205
  216,
1206
- 217,
1207
- 218,
1208
- 219,
1209
- 220,
1210
- 221,
1211
- 222,
1212
- 223
1213
  ],
1214
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b104_hardcoded_bind_all_interfaces.html",
1215
  "test_id": "B104",
1216
  "test_name": "hardcoded_bind_all_interfaces"
1217
  },
1218
  {
1219
- "code": "261 return {\n262 \"/tmp\": f\"rw,size={tmpfs_size},mode=1777\",\n263 _SANDBOX_HOME: (\n264 f\"rw,size={tmpfs_size},mode=0700,\"\n265 f\"uid={_SANDBOX_UID},gid={_SANDBOX_UID}\"\n266 ),\n267 }\n268 \n269 def _hardening_flags(self) -> List[str]:\n",
1220
  "col_offset": 12,
1221
  "end_col_offset": 18,
1222
  "filename": "src/managers/execution/sandbox/launchers.py",
@@ -1227,22 +1313,21 @@
1227
  },
1228
  "issue_severity": "MEDIUM",
1229
  "issue_text": "Probable insecure usage of temp file/directory.",
1230
- "line_number": 262,
1231
  "line_range": [
1232
- 261,
1233
- 262,
1234
- 263,
1235
- 264,
1236
- 265,
1237
- 266,
1238
- 267
1239
  ],
1240
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1241
  "test_id": "B108",
1242
  "test_name": "hardcoded_tmp_directory"
1243
  },
1244
  {
1245
- "code": "18 \n19 _R_READY_FLAG = \"/tmp/decoupleRpy/r_deps_installed\"\n20 \n",
1246
  "col_offset": 16,
1247
  "end_col_offset": 51,
1248
  "filename": "src/mcp_server/dependencies/r_dependencies.py",
@@ -1253,16 +1338,16 @@
1253
  },
1254
  "issue_severity": "MEDIUM",
1255
  "issue_text": "Probable insecure usage of temp file/directory.",
1256
- "line_number": 19,
1257
  "line_range": [
1258
- 19
1259
  ],
1260
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1261
  "test_id": "B108",
1262
  "test_name": "hardcoded_tmp_directory"
1263
  },
1264
  {
1265
- "code": "56 except PermissionError:\n57 fallback = Path(\"/tmp/decoupleRpy/outputs\")\n58 fallback.mkdir(parents=True, exist_ok=True)\n",
1266
  "col_offset": 24,
1267
  "end_col_offset": 50,
1268
  "filename": "src/tools/bulk_dataset_tools.py",
@@ -1273,16 +1358,16 @@
1273
  },
1274
  "issue_severity": "MEDIUM",
1275
  "issue_text": "Probable insecure usage of temp file/directory.",
1276
- "line_number": 57,
1277
  "line_range": [
1278
- 57
1279
  ],
1280
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1281
  "test_id": "B108",
1282
  "test_name": "hardcoded_tmp_directory"
1283
  },
1284
  {
1285
- "code": "31 except PermissionError:\n32 fallback = Path(\"/tmp/decoupleRpy/outputs\")\n33 fallback.mkdir(parents=True, exist_ok=True)\n",
1286
  "col_offset": 24,
1287
  "end_col_offset": 50,
1288
  "filename": "src/tools/bulk_rnaseq/_base.py",
@@ -1293,16 +1378,16 @@
1293
  },
1294
  "issue_severity": "MEDIUM",
1295
  "issue_text": "Probable insecure usage of temp file/directory.",
1296
- "line_number": 32,
1297
  "line_range": [
1298
- 32
1299
  ],
1300
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1301
  "test_id": "B108",
1302
  "test_name": "hardcoded_tmp_directory"
1303
  },
1304
  {
1305
- "code": "254 )\n255 with urllib.request.urlopen(req, timeout=60) as resp:\n256 result = json.loads(resp.read())\n",
1306
  "col_offset": 9,
1307
  "end_col_offset": 48,
1308
  "filename": "src/tools/bulk_rnaseq/_base.py",
@@ -1313,16 +1398,16 @@
1313
  },
1314
  "issue_severity": "MEDIUM",
1315
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1316
- "line_number": 255,
1317
  "line_range": [
1318
- 255
1319
  ],
1320
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1321
  "test_id": "B310",
1322
  "test_name": "blacklist"
1323
  },
1324
  {
1325
- "code": "309 tmp = tempfile.NamedTemporaryFile(\n310 suffix=\".tar.gz\", delete=False, dir=\"/tmp\", prefix=\"gdc_star_\"\n311 )\n",
1326
  "col_offset": 44,
1327
  "end_col_offset": 50,
1328
  "filename": "src/tools/bulk_rnaseq/_base.py",
@@ -1333,16 +1418,16 @@
1333
  },
1334
  "issue_severity": "MEDIUM",
1335
  "issue_text": "Probable insecure usage of temp file/directory.",
1336
- "line_number": 310,
1337
  "line_range": [
1338
- 310
1339
  ],
1340
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1341
  "test_id": "B108",
1342
  "test_name": "hardcoded_tmp_directory"
1343
  },
1344
  {
1345
- "code": "313 print(f\"[gdc] Downloading {len(file_ids)} files as tar.gz \u2026\")\n314 with urllib.request.urlopen(req, timeout=600) as resp:\n315 downloaded = 0\n",
1346
  "col_offset": 13,
1347
  "end_col_offset": 53,
1348
  "filename": "src/tools/bulk_rnaseq/_base.py",
@@ -1353,16 +1438,16 @@
1353
  },
1354
  "issue_severity": "MEDIUM",
1355
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1356
- "line_number": 314,
1357
  "line_range": [
1358
- 314
1359
  ],
1360
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1361
  "test_id": "B310",
1362
  "test_name": "blacklist"
1363
  },
1364
  {
1365
- "code": "110 if url_or_path.startswith((\"http://\", \"https://\", \"ftp://\")):\n111 with urllib.request.urlopen(url_or_path) as resp:\n112 while True:\n",
1366
  "col_offset": 21,
1367
  "end_col_offset": 56,
1368
  "filename": "src/tools/bulk_rnaseq/tools.py",
@@ -1373,76 +1458,16 @@
1373
  },
1374
  "issue_severity": "MEDIUM",
1375
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1376
- "line_number": 111,
1377
  "line_range": [
1378
- 111
1379
  ],
1380
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1381
  "test_id": "B310",
1382
  "test_name": "blacklist"
1383
  },
1384
  {
1385
- "code": "48 \n49 INPUT_DIR = _resolve_dir(\"RNA_INPUT_DIR\", _DEFAULT_INPUT, Path(\"/tmp/decoupleRpy/inputs\"))\n50 OUTPUT_DIR = _resolve_dir(\"RNA_OUTPUT_DIR\", _DEFAULT_OUTPUT, Path(\"/tmp/decoupleRpy/outputs\"))\n",
1386
- "col_offset": 63,
1387
- "end_col_offset": 88,
1388
- "filename": "src/tools/rna/_base.py",
1389
- "issue_confidence": "MEDIUM",
1390
- "issue_cwe": {
1391
- "id": 377,
1392
- "link": "https://cwe.mitre.org/data/definitions/377.html"
1393
- },
1394
- "issue_severity": "MEDIUM",
1395
- "issue_text": "Probable insecure usage of temp file/directory.",
1396
- "line_number": 49,
1397
- "line_range": [
1398
- 49
1399
- ],
1400
- "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1401
- "test_id": "B108",
1402
- "test_name": "hardcoded_tmp_directory"
1403
- },
1404
- {
1405
- "code": "49 INPUT_DIR = _resolve_dir(\"RNA_INPUT_DIR\", _DEFAULT_INPUT, Path(\"/tmp/decoupleRpy/inputs\"))\n50 OUTPUT_DIR = _resolve_dir(\"RNA_OUTPUT_DIR\", _DEFAULT_OUTPUT, Path(\"/tmp/decoupleRpy/outputs\"))\n51 GEO_CACHE_DIR = _resolve_dir(\"RNA_GEO_CACHE_DIR\", _DEFAULT_GEO_CACHE, Path(\"/tmp/decoupleRpy/geo_cache\"))\n",
1406
- "col_offset": 66,
1407
- "end_col_offset": 92,
1408
- "filename": "src/tools/rna/_base.py",
1409
- "issue_confidence": "MEDIUM",
1410
- "issue_cwe": {
1411
- "id": 377,
1412
- "link": "https://cwe.mitre.org/data/definitions/377.html"
1413
- },
1414
- "issue_severity": "MEDIUM",
1415
- "issue_text": "Probable insecure usage of temp file/directory.",
1416
- "line_number": 50,
1417
- "line_range": [
1418
- 50
1419
- ],
1420
- "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1421
- "test_id": "B108",
1422
- "test_name": "hardcoded_tmp_directory"
1423
- },
1424
- {
1425
- "code": "50 OUTPUT_DIR = _resolve_dir(\"RNA_OUTPUT_DIR\", _DEFAULT_OUTPUT, Path(\"/tmp/decoupleRpy/outputs\"))\n51 GEO_CACHE_DIR = _resolve_dir(\"RNA_GEO_CACHE_DIR\", _DEFAULT_GEO_CACHE, Path(\"/tmp/decoupleRpy/geo_cache\"))\n52 \n",
1426
- "col_offset": 75,
1427
- "end_col_offset": 103,
1428
- "filename": "src/tools/rna/_base.py",
1429
- "issue_confidence": "MEDIUM",
1430
- "issue_cwe": {
1431
- "id": 377,
1432
- "link": "https://cwe.mitre.org/data/definitions/377.html"
1433
- },
1434
- "issue_severity": "MEDIUM",
1435
- "issue_text": "Probable insecure usage of temp file/directory.",
1436
- "line_number": 51,
1437
- "line_range": [
1438
- 51
1439
- ],
1440
- "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1441
- "test_id": "B108",
1442
- "test_name": "hardcoded_tmp_directory"
1443
- },
1444
- {
1445
- "code": "129 if url_or_path.startswith((\"http://\", \"https://\", \"ftp://\")):\n130 with urllib.request.urlopen(url_or_path) as resp:\n131 raw = resp.read()\n",
1446
  "col_offset": 13,
1447
  "end_col_offset": 48,
1448
  "filename": "src/workflows/geo.py",
@@ -1453,16 +1478,16 @@
1453
  },
1454
  "issue_severity": "MEDIUM",
1455
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1456
- "line_number": 130,
1457
  "line_range": [
1458
- 130
1459
  ],
1460
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1461
  "test_id": "B310",
1462
  "test_name": "blacklist"
1463
  },
1464
  {
1465
- "code": "311 \n312 with _ur.urlopen(resolved) as resp:\n313 raw = resp.read()\n",
1466
  "col_offset": 9,
1467
  "end_col_offset": 30,
1468
  "filename": "src/workflows/geo.py",
@@ -1473,13 +1498,13 @@
1473
  },
1474
  "issue_severity": "MEDIUM",
1475
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1476
- "line_number": 312,
1477
  "line_range": [
1478
- 312
1479
  ],
1480
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1481
  "test_id": "B310",
1482
  "test_name": "blacklist"
1483
  }
1484
  ]
1485
- }
 
1
  {
2
  "errors": [],
3
+ "generated_at": "2026-07-07T15:04:13Z",
4
  "metrics": {
5
  "_totals": {
6
  "CONFIDENCE.HIGH": 31,
 
11
  "SEVERITY.LOW": 25,
12
  "SEVERITY.MEDIUM": 16,
13
  "SEVERITY.UNDEFINED": 0,
14
+ "loc": 19820,
15
  "nosec": 0,
16
  "skipped_tests": 3
17
  },
 
24
  "SEVERITY.LOW": 0,
25
  "SEVERITY.MEDIUM": 0,
26
  "SEVERITY.UNDEFINED": 0,
27
+ "loc": 456,
28
  "nosec": 0,
29
  "skipped_tests": 0
30
  },
 
54
  "nosec": 0,
55
  "skipped_tests": 0
56
  },
57
+ "src/core/access_control.py": {
58
+ "CONFIDENCE.HIGH": 0,
59
+ "CONFIDENCE.LOW": 0,
60
+ "CONFIDENCE.MEDIUM": 0,
61
+ "CONFIDENCE.UNDEFINED": 0,
62
+ "SEVERITY.HIGH": 0,
63
+ "SEVERITY.LOW": 0,
64
+ "SEVERITY.MEDIUM": 0,
65
+ "SEVERITY.UNDEFINED": 0,
66
+ "loc": 92,
67
+ "nosec": 0,
68
+ "skipped_tests": 0
69
+ },
70
  "src/core/combine.py": {
71
  "CONFIDENCE.HIGH": 0,
72
  "CONFIDENCE.LOW": 0,
 
115
  "SEVERITY.LOW": 1,
116
  "SEVERITY.MEDIUM": 0,
117
  "SEVERITY.UNDEFINED": 0,
118
+ "loc": 139,
119
+ "nosec": 0,
120
+ "skipped_tests": 0
121
+ },
122
+ "src/core/paths.py": {
123
+ "CONFIDENCE.HIGH": 0,
124
+ "CONFIDENCE.LOW": 0,
125
+ "CONFIDENCE.MEDIUM": 3,
126
+ "CONFIDENCE.UNDEFINED": 0,
127
+ "SEVERITY.HIGH": 0,
128
+ "SEVERITY.LOW": 0,
129
+ "SEVERITY.MEDIUM": 3,
130
+ "SEVERITY.UNDEFINED": 0,
131
+ "loc": 33,
132
  "nosec": 0,
133
  "skipped_tests": 0
134
  },
 
141
  "SEVERITY.LOW": 0,
142
  "SEVERITY.MEDIUM": 0,
143
  "SEVERITY.UNDEFINED": 0,
144
+ "loc": 34,
145
  "nosec": 0,
146
  "skipped_tests": 0
147
  },
 
154
  "SEVERITY.LOW": 0,
155
  "SEVERITY.MEDIUM": 0,
156
  "SEVERITY.UNDEFINED": 0,
157
+ "loc": 168,
158
  "nosec": 0,
159
  "skipped_tests": 0
160
  },
 
193
  "SEVERITY.LOW": 0,
194
  "SEVERITY.MEDIUM": 0,
195
  "SEVERITY.UNDEFINED": 0,
196
+ "loc": 482,
197
  "nosec": 0,
198
  "skipped_tests": 0
199
  },
 
206
  "SEVERITY.LOW": 0,
207
  "SEVERITY.MEDIUM": 0,
208
  "SEVERITY.UNDEFINED": 0,
209
+ "loc": 218,
210
  "nosec": 0,
211
  "skipped_tests": 0
212
  },
 
219
  "SEVERITY.LOW": 0,
220
  "SEVERITY.MEDIUM": 0,
221
  "SEVERITY.UNDEFINED": 0,
222
+ "loc": 165,
223
  "nosec": 0,
224
  "skipped_tests": 0
225
  },
 
258
  "SEVERITY.LOW": 0,
259
  "SEVERITY.MEDIUM": 0,
260
  "SEVERITY.UNDEFINED": 0,
261
+ "loc": 76,
262
  "nosec": 0,
263
  "skipped_tests": 0
264
  },
 
310
  "SEVERITY.LOW": 0,
311
  "SEVERITY.MEDIUM": 0,
312
  "SEVERITY.UNDEFINED": 0,
313
+ "loc": 22,
314
  "nosec": 0,
315
  "skipped_tests": 0
316
  },
 
336
  "SEVERITY.LOW": 0,
337
  "SEVERITY.MEDIUM": 0,
338
  "SEVERITY.UNDEFINED": 0,
339
+ "loc": 166,
340
  "nosec": 0,
341
  "skipped_tests": 0
342
  },
 
349
  "SEVERITY.LOW": 8,
350
  "SEVERITY.MEDIUM": 2,
351
  "SEVERITY.UNDEFINED": 0,
352
+ "loc": 344,
353
  "nosec": 0,
354
  "skipped_tests": 0
355
  },
 
362
  "SEVERITY.LOW": 0,
363
  "SEVERITY.MEDIUM": 0,
364
  "SEVERITY.UNDEFINED": 0,
365
+ "loc": 215,
366
  "nosec": 0,
367
  "skipped_tests": 0
368
  },
 
375
  "SEVERITY.LOW": 0,
376
  "SEVERITY.MEDIUM": 0,
377
  "SEVERITY.UNDEFINED": 0,
378
+ "loc": 228,
379
  "nosec": 0,
380
  "skipped_tests": 0
381
  },
 
401
  "SEVERITY.LOW": 0,
402
  "SEVERITY.MEDIUM": 0,
403
  "SEVERITY.UNDEFINED": 0,
404
+ "loc": 120,
405
  "nosec": 0,
406
  "skipped_tests": 0
407
  },
 
414
  "SEVERITY.LOW": 0,
415
  "SEVERITY.MEDIUM": 0,
416
  "SEVERITY.UNDEFINED": 0,
417
+ "loc": 48,
418
  "nosec": 0,
419
  "skipped_tests": 0
420
  },
 
453
  "SEVERITY.LOW": 0,
454
  "SEVERITY.MEDIUM": 0,
455
  "SEVERITY.UNDEFINED": 0,
456
+ "loc": 558,
457
  "nosec": 0,
458
  "skipped_tests": 0
459
  },
 
466
  "SEVERITY.LOW": 0,
467
  "SEVERITY.MEDIUM": 0,
468
  "SEVERITY.UNDEFINED": 0,
469
+ "loc": 376,
470
  "nosec": 0,
471
  "skipped_tests": 0
472
  },
 
479
  "SEVERITY.LOW": 0,
480
  "SEVERITY.MEDIUM": 0,
481
  "SEVERITY.UNDEFINED": 0,
482
+ "loc": 98,
483
  "nosec": 0,
484
  "skipped_tests": 0
485
  },
 
505
  "SEVERITY.LOW": 0,
506
  "SEVERITY.MEDIUM": 0,
507
  "SEVERITY.UNDEFINED": 0,
508
+ "loc": 44,
509
  "nosec": 0,
510
  "skipped_tests": 0
511
  },
 
518
  "SEVERITY.LOW": 0,
519
  "SEVERITY.MEDIUM": 0,
520
  "SEVERITY.UNDEFINED": 0,
521
+ "loc": 19,
522
  "nosec": 0,
523
  "skipped_tests": 0
524
  },
 
531
  "SEVERITY.LOW": 0,
532
  "SEVERITY.MEDIUM": 0,
533
  "SEVERITY.UNDEFINED": 0,
534
+ "loc": 259,
535
  "nosec": 0,
536
  "skipped_tests": 0
537
  },
 
570
  "SEVERITY.LOW": 0,
571
  "SEVERITY.MEDIUM": 1,
572
  "SEVERITY.UNDEFINED": 0,
573
+ "loc": 90,
574
  "nosec": 0,
575
  "skipped_tests": 0
576
  },
 
596
  "SEVERITY.LOW": 0,
597
  "SEVERITY.MEDIUM": 0,
598
  "SEVERITY.UNDEFINED": 0,
599
+ "loc": 141,
600
  "nosec": 0,
601
  "skipped_tests": 0
602
  },
 
609
  "SEVERITY.LOW": 0,
610
  "SEVERITY.MEDIUM": 0,
611
  "SEVERITY.UNDEFINED": 0,
612
+ "loc": 134,
613
  "nosec": 0,
614
  "skipped_tests": 0
615
  },
 
622
  "SEVERITY.LOW": 0,
623
  "SEVERITY.MEDIUM": 0,
624
  "SEVERITY.UNDEFINED": 0,
625
+ "loc": 116,
626
  "nosec": 0,
627
  "skipped_tests": 0
628
  },
 
635
  "SEVERITY.LOW": 0,
636
  "SEVERITY.MEDIUM": 0,
637
  "SEVERITY.UNDEFINED": 0,
638
+ "loc": 123,
639
  "nosec": 0,
640
  "skipped_tests": 0
641
  },
 
661
  "SEVERITY.LOW": 0,
662
  "SEVERITY.MEDIUM": 0,
663
  "SEVERITY.UNDEFINED": 0,
664
+ "loc": 102,
665
  "nosec": 0,
666
  "skipped_tests": 0
667
  },
 
674
  "SEVERITY.LOW": 0,
675
  "SEVERITY.MEDIUM": 1,
676
  "SEVERITY.UNDEFINED": 0,
677
+ "loc": 486,
678
  "nosec": 0,
679
  "skipped_tests": 0
680
  },
 
687
  "SEVERITY.LOW": 0,
688
  "SEVERITY.MEDIUM": 0,
689
  "SEVERITY.UNDEFINED": 0,
690
+ "loc": 54,
691
  "nosec": 0,
692
  "skipped_tests": 0
693
  },
 
700
  "SEVERITY.LOW": 0,
701
  "SEVERITY.MEDIUM": 4,
702
  "SEVERITY.UNDEFINED": 0,
703
+ "loc": 386,
704
  "nosec": 0,
705
  "skipped_tests": 0
706
  },
 
713
  "SEVERITY.LOW": 0,
714
  "SEVERITY.MEDIUM": 1,
715
  "SEVERITY.UNDEFINED": 0,
716
+ "loc": 510,
717
  "nosec": 0,
718
  "skipped_tests": 0
719
  },
 
726
  "SEVERITY.LOW": 0,
727
  "SEVERITY.MEDIUM": 0,
728
  "SEVERITY.UNDEFINED": 0,
729
+ "loc": 32,
730
  "nosec": 0,
731
  "skipped_tests": 0
732
  },
 
739
  "SEVERITY.LOW": 0,
740
  "SEVERITY.MEDIUM": 0,
741
  "SEVERITY.UNDEFINED": 0,
742
+ "loc": 904,
743
  "nosec": 0,
744
  "skipped_tests": 0
745
  },
 
752
  "SEVERITY.LOW": 0,
753
  "SEVERITY.MEDIUM": 0,
754
  "SEVERITY.UNDEFINED": 0,
755
+ "loc": 446,
756
  "nosec": 0,
757
  "skipped_tests": 0
758
  },
 
765
  "SEVERITY.LOW": 0,
766
  "SEVERITY.MEDIUM": 0,
767
  "SEVERITY.UNDEFINED": 0,
768
+ "loc": 432,
769
  "nosec": 0,
770
  "skipped_tests": 0
771
  },
 
778
  "SEVERITY.LOW": 0,
779
  "SEVERITY.MEDIUM": 0,
780
  "SEVERITY.UNDEFINED": 0,
781
+ "loc": 303,
782
  "nosec": 0,
783
  "skipped_tests": 0
784
  },
 
791
  "SEVERITY.LOW": 0,
792
  "SEVERITY.MEDIUM": 0,
793
  "SEVERITY.UNDEFINED": 0,
794
+ "loc": 674,
795
  "nosec": 0,
796
  "skipped_tests": 0
797
  },
 
837
  "src/tools/rna/_base.py": {
838
  "CONFIDENCE.HIGH": 0,
839
  "CONFIDENCE.LOW": 0,
840
+ "CONFIDENCE.MEDIUM": 0,
841
  "CONFIDENCE.UNDEFINED": 0,
842
  "SEVERITY.HIGH": 0,
843
  "SEVERITY.LOW": 0,
844
+ "SEVERITY.MEDIUM": 0,
845
  "SEVERITY.UNDEFINED": 0,
846
+ "loc": 101,
847
  "nosec": 0,
848
  "skipped_tests": 0
849
  },
 
856
  "SEVERITY.LOW": 0,
857
  "SEVERITY.MEDIUM": 0,
858
  "SEVERITY.UNDEFINED": 0,
859
+ "loc": 774,
860
  "nosec": 0,
861
  "skipped_tests": 0
862
  },
 
869
  "SEVERITY.LOW": 4,
870
  "SEVERITY.MEDIUM": 0,
871
  "SEVERITY.UNDEFINED": 0,
872
+ "loc": 823,
873
  "nosec": 0,
874
  "skipped_tests": 0
875
  },
 
882
  "SEVERITY.LOW": 0,
883
  "SEVERITY.MEDIUM": 0,
884
  "SEVERITY.UNDEFINED": 0,
885
+ "loc": 490,
886
  "nosec": 0,
887
  "skipped_tests": 0
888
  },
 
895
  "SEVERITY.LOW": 0,
896
  "SEVERITY.MEDIUM": 0,
897
  "SEVERITY.UNDEFINED": 0,
898
+ "loc": 674,
899
  "nosec": 0,
900
  "skipped_tests": 0
901
  },
 
908
  "SEVERITY.LOW": 0,
909
  "SEVERITY.MEDIUM": 0,
910
  "SEVERITY.UNDEFINED": 0,
911
+ "loc": 687,
912
  "nosec": 0,
913
  "skipped_tests": 0
914
  },
 
973
  "SEVERITY.LOW": 2,
974
  "SEVERITY.MEDIUM": 0,
975
  "SEVERITY.UNDEFINED": 0,
976
+ "loc": 237,
977
  "nosec": 0,
978
  "skipped_tests": 0
979
  },
 
986
  "SEVERITY.LOW": 0,
987
  "SEVERITY.MEDIUM": 0,
988
  "SEVERITY.UNDEFINED": 0,
989
+ "loc": 147,
990
  "nosec": 0,
991
  "skipped_tests": 0
992
  },
 
999
  "SEVERITY.LOW": 0,
1000
  "SEVERITY.MEDIUM": 0,
1001
  "SEVERITY.UNDEFINED": 0,
1002
+ "loc": 182,
1003
  "nosec": 0,
1004
  "skipped_tests": 0
1005
  },
 
1025
  "SEVERITY.LOW": 0,
1026
  "SEVERITY.MEDIUM": 0,
1027
  "SEVERITY.UNDEFINED": 0,
1028
+ "loc": 204,
1029
  "nosec": 0,
1030
  "skipped_tests": 0
1031
  },
 
1038
  "SEVERITY.LOW": 0,
1039
  "SEVERITY.MEDIUM": 0,
1040
  "SEVERITY.UNDEFINED": 0,
1041
+ "loc": 240,
1042
  "nosec": 0,
1043
  "skipped_tests": 0
1044
  },
 
1051
  "SEVERITY.LOW": 0,
1052
  "SEVERITY.MEDIUM": 0,
1053
  "SEVERITY.UNDEFINED": 0,
1054
+ "loc": 229,
1055
  "nosec": 0,
1056
  "skipped_tests": 0
1057
  },
 
1064
  "SEVERITY.LOW": 0,
1065
  "SEVERITY.MEDIUM": 2,
1066
  "SEVERITY.UNDEFINED": 0,
1067
+ "loc": 489,
1068
  "nosec": 0,
1069
  "skipped_tests": 0
1070
  },
 
1077
  "SEVERITY.LOW": 0,
1078
  "SEVERITY.MEDIUM": 0,
1079
  "SEVERITY.UNDEFINED": 0,
1080
+ "loc": 273,
1081
  "nosec": 0,
1082
  "skipped_tests": 0
1083
  },
 
1090
  "SEVERITY.LOW": 0,
1091
  "SEVERITY.MEDIUM": 0,
1092
  "SEVERITY.UNDEFINED": 0,
1093
+ "loc": 526,
1094
  "nosec": 0,
1095
  "skipped_tests": 0
1096
  },
 
1103
  "SEVERITY.LOW": 0,
1104
  "SEVERITY.MEDIUM": 0,
1105
  "SEVERITY.UNDEFINED": 0,
1106
+ "loc": 499,
1107
  "nosec": 0,
1108
  "skipped_tests": 0
1109
  },
 
1116
  "SEVERITY.LOW": 0,
1117
  "SEVERITY.MEDIUM": 0,
1118
  "SEVERITY.UNDEFINED": 0,
1119
+ "loc": 546,
1120
  "nosec": 0,
1121
  "skipped_tests": 0
1122
  },
 
1129
  "SEVERITY.LOW": 6,
1130
  "SEVERITY.MEDIUM": 0,
1131
  "SEVERITY.UNDEFINED": 0,
1132
+ "loc": 828,
1133
  "nosec": 0,
1134
  "skipped_tests": 0
1135
  },
 
1142
  "SEVERITY.LOW": 0,
1143
  "SEVERITY.MEDIUM": 0,
1144
  "SEVERITY.UNDEFINED": 0,
1145
+ "loc": 401,
1146
  "nosec": 0,
1147
  "skipped_tests": 0
1148
  },
 
1155
  "SEVERITY.LOW": 0,
1156
  "SEVERITY.MEDIUM": 0,
1157
  "SEVERITY.UNDEFINED": 0,
1158
+ "loc": 148,
1159
  "nosec": 0,
1160
  "skipped_tests": 0
1161
  },
 
1168
  "SEVERITY.LOW": 0,
1169
  "SEVERITY.MEDIUM": 0,
1170
  "SEVERITY.UNDEFINED": 0,
1171
+ "loc": 120,
1172
  "nosec": 0,
1173
  "skipped_tests": 0
1174
  }
1175
  },
1176
  "results": [
1177
  {
1178
+ "code": "29 \n30 CACHE_DIR = Path(\"/tmp/decoupleRpy/cache\")\n31 \n",
1179
  "col_offset": 17,
1180
  "end_col_offset": 41,
1181
  "filename": "src/cache.py",
 
1186
  },
1187
  "issue_severity": "MEDIUM",
1188
  "issue_text": "Probable insecure usage of temp file/directory.",
1189
+ "line_number": 30,
1190
  "line_range": [
1191
+ 30
1192
  ],
1193
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1194
  "test_id": "B108",
1195
  "test_name": "hardcoded_tmp_directory"
1196
  },
1197
  {
1198
+ "code": "80 with tempfile.NamedTemporaryFile(suffix=suffix, delete=False) as tmp:\n81 with urllib.request.urlopen(s) as resp:\n82 while True:\n",
1199
  "col_offset": 13,
1200
  "end_col_offset": 38,
1201
  "filename": "src/core/data_io.py",
 
1206
  },
1207
  "issue_severity": "MEDIUM",
1208
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1209
+ "line_number": 81,
1210
  "line_range": [
1211
+ 81
1212
  ],
1213
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1214
  "test_id": "B310",
1215
  "test_name": "blacklist"
1216
  },
1217
  {
1218
+ "code": "38 \n39 INPUT_DIR = _resolve_dir(\"RNA_INPUT_DIR\", _DEFAULT_INPUT, Path(\"/tmp/decoupleRpy/inputs\"))\n40 OUTPUT_DIR = _resolve_dir(\"RNA_OUTPUT_DIR\", _DEFAULT_OUTPUT, Path(\"/tmp/decoupleRpy/outputs\"))\n",
1219
+ "col_offset": 63,
1220
+ "end_col_offset": 88,
1221
+ "filename": "src/core/paths.py",
1222
+ "issue_confidence": "MEDIUM",
1223
+ "issue_cwe": {
1224
+ "id": 377,
1225
+ "link": "https://cwe.mitre.org/data/definitions/377.html"
1226
+ },
1227
+ "issue_severity": "MEDIUM",
1228
+ "issue_text": "Probable insecure usage of temp file/directory.",
1229
+ "line_number": 39,
1230
+ "line_range": [
1231
+ 39
1232
+ ],
1233
+ "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1234
+ "test_id": "B108",
1235
+ "test_name": "hardcoded_tmp_directory"
1236
+ },
1237
+ {
1238
+ "code": "39 INPUT_DIR = _resolve_dir(\"RNA_INPUT_DIR\", _DEFAULT_INPUT, Path(\"/tmp/decoupleRpy/inputs\"))\n40 OUTPUT_DIR = _resolve_dir(\"RNA_OUTPUT_DIR\", _DEFAULT_OUTPUT, Path(\"/tmp/decoupleRpy/outputs\"))\n41 GEO_CACHE_DIR = _resolve_dir(\n",
1239
+ "col_offset": 66,
1240
+ "end_col_offset": 92,
1241
+ "filename": "src/core/paths.py",
1242
+ "issue_confidence": "MEDIUM",
1243
+ "issue_cwe": {
1244
+ "id": 377,
1245
+ "link": "https://cwe.mitre.org/data/definitions/377.html"
1246
+ },
1247
+ "issue_severity": "MEDIUM",
1248
+ "issue_text": "Probable insecure usage of temp file/directory.",
1249
+ "line_number": 40,
1250
+ "line_range": [
1251
+ 40
1252
+ ],
1253
+ "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1254
+ "test_id": "B108",
1255
+ "test_name": "hardcoded_tmp_directory"
1256
+ },
1257
+ {
1258
+ "code": "41 GEO_CACHE_DIR = _resolve_dir(\n42 \"RNA_GEO_CACHE_DIR\", _DEFAULT_GEO_CACHE, Path(\"/tmp/decoupleRpy/geo_cache\")\n43 )\n",
1259
+ "col_offset": 50,
1260
+ "end_col_offset": 78,
1261
+ "filename": "src/core/paths.py",
1262
+ "issue_confidence": "MEDIUM",
1263
+ "issue_cwe": {
1264
+ "id": 377,
1265
+ "link": "https://cwe.mitre.org/data/definitions/377.html"
1266
+ },
1267
+ "issue_severity": "MEDIUM",
1268
+ "issue_text": "Probable insecure usage of temp file/directory.",
1269
+ "line_number": 42,
1270
+ "line_range": [
1271
+ 42
1272
+ ],
1273
+ "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1274
+ "test_id": "B108",
1275
+ "test_name": "hardcoded_tmp_directory"
1276
+ },
1277
+ {
1278
+ "code": "213 \"--host\",\n214 \"0.0.0.0\",\n215 \"--session-id\",\n216 self.session_id,\n217 ]\n218 \n219 # -- Phase-2 hardening (ADR-0007) --------------------------------------- #\n220 def _hardening(self) -> dict:\n221 \"\"\"Single source of truth for the Phase-2 lockdown, read from env once.\n222 \n",
1279
  "col_offset": 12,
1280
  "end_col_offset": 21,
1281
  "filename": "src/managers/execution/sandbox/launchers.py",
 
1286
  },
1287
  "issue_severity": "MEDIUM",
1288
  "issue_text": "Possible binding to all interfaces.",
1289
+ "line_number": 214,
1290
  "line_range": [
1291
+ 210,
1292
+ 211,
1293
+ 212,
1294
+ 213,
1295
+ 214,
1296
+ 215,
1297
  216,
1298
+ 217
 
 
 
 
 
 
1299
  ],
1300
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b104_hardcoded_bind_all_interfaces.html",
1301
  "test_id": "B104",
1302
  "test_name": "hardcoded_bind_all_interfaces"
1303
  },
1304
  {
1305
+ "code": "255 return {\n256 \"/tmp\": f\"rw,size={tmpfs_size},mode=1777\",\n257 _SANDBOX_HOME: (\n258 f\"rw,size={tmpfs_size},mode=0700,uid={_SANDBOX_UID},gid={_SANDBOX_UID}\"\n259 ),\n260 }\n261 \n262 def _hardening_flags(self) -> list[str]:\n",
1306
  "col_offset": 12,
1307
  "end_col_offset": 18,
1308
  "filename": "src/managers/execution/sandbox/launchers.py",
 
1313
  },
1314
  "issue_severity": "MEDIUM",
1315
  "issue_text": "Probable insecure usage of temp file/directory.",
1316
+ "line_number": 256,
1317
  "line_range": [
1318
+ 255,
1319
+ 256,
1320
+ 257,
1321
+ 258,
1322
+ 259,
1323
+ 260
 
1324
  ],
1325
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1326
  "test_id": "B108",
1327
  "test_name": "hardcoded_tmp_directory"
1328
  },
1329
  {
1330
+ "code": "17 \n18 _R_READY_FLAG = \"/tmp/decoupleRpy/r_deps_installed\"\n19 \n",
1331
  "col_offset": 16,
1332
  "end_col_offset": 51,
1333
  "filename": "src/mcp_server/dependencies/r_dependencies.py",
 
1338
  },
1339
  "issue_severity": "MEDIUM",
1340
  "issue_text": "Probable insecure usage of temp file/directory.",
1341
+ "line_number": 18,
1342
  "line_range": [
1343
+ 18
1344
  ],
1345
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1346
  "test_id": "B108",
1347
  "test_name": "hardcoded_tmp_directory"
1348
  },
1349
  {
1350
+ "code": "57 except PermissionError:\n58 fallback = Path(\"/tmp/decoupleRpy/outputs\")\n59 fallback.mkdir(parents=True, exist_ok=True)\n",
1351
  "col_offset": 24,
1352
  "end_col_offset": 50,
1353
  "filename": "src/tools/bulk_dataset_tools.py",
 
1358
  },
1359
  "issue_severity": "MEDIUM",
1360
  "issue_text": "Probable insecure usage of temp file/directory.",
1361
+ "line_number": 58,
1362
  "line_range": [
1363
+ 58
1364
  ],
1365
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1366
  "test_id": "B108",
1367
  "test_name": "hardcoded_tmp_directory"
1368
  },
1369
  {
1370
+ "code": "32 except PermissionError:\n33 fallback = Path(\"/tmp/decoupleRpy/outputs\")\n34 fallback.mkdir(parents=True, exist_ok=True)\n",
1371
  "col_offset": 24,
1372
  "end_col_offset": 50,
1373
  "filename": "src/tools/bulk_rnaseq/_base.py",
 
1378
  },
1379
  "issue_severity": "MEDIUM",
1380
  "issue_text": "Probable insecure usage of temp file/directory.",
1381
+ "line_number": 33,
1382
  "line_range": [
1383
+ 33
1384
  ],
1385
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1386
  "test_id": "B108",
1387
  "test_name": "hardcoded_tmp_directory"
1388
  },
1389
  {
1390
+ "code": "277 )\n278 with urllib.request.urlopen(req, timeout=60) as resp:\n279 result = json.loads(resp.read())\n",
1391
  "col_offset": 9,
1392
  "end_col_offset": 48,
1393
  "filename": "src/tools/bulk_rnaseq/_base.py",
 
1398
  },
1399
  "issue_severity": "MEDIUM",
1400
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1401
+ "line_number": 278,
1402
  "line_range": [
1403
+ 278
1404
  ],
1405
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1406
  "test_id": "B310",
1407
  "test_name": "blacklist"
1408
  },
1409
  {
1410
+ "code": "332 tmp = tempfile.NamedTemporaryFile(\n333 suffix=\".tar.gz\", delete=False, dir=\"/tmp\", prefix=\"gdc_star_\"\n334 )\n",
1411
  "col_offset": 44,
1412
  "end_col_offset": 50,
1413
  "filename": "src/tools/bulk_rnaseq/_base.py",
 
1418
  },
1419
  "issue_severity": "MEDIUM",
1420
  "issue_text": "Probable insecure usage of temp file/directory.",
1421
+ "line_number": 333,
1422
  "line_range": [
1423
+ 333
1424
  ],
1425
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html",
1426
  "test_id": "B108",
1427
  "test_name": "hardcoded_tmp_directory"
1428
  },
1429
  {
1430
+ "code": "336 print(f\"[gdc] Downloading {len(file_ids)} files as tar.gz \u2026\")\n337 with urllib.request.urlopen(req, timeout=600) as resp:\n338 downloaded = 0\n",
1431
  "col_offset": 13,
1432
  "end_col_offset": 53,
1433
  "filename": "src/tools/bulk_rnaseq/_base.py",
 
1438
  },
1439
  "issue_severity": "MEDIUM",
1440
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1441
+ "line_number": 337,
1442
  "line_range": [
1443
+ 337
1444
  ],
1445
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1446
  "test_id": "B310",
1447
  "test_name": "blacklist"
1448
  },
1449
  {
1450
+ "code": "127 if url_or_path.startswith((\"http://\", \"https://\", \"ftp://\")):\n128 with urllib.request.urlopen(url_or_path) as resp:\n129 while True:\n",
1451
  "col_offset": 21,
1452
  "end_col_offset": 56,
1453
  "filename": "src/tools/bulk_rnaseq/tools.py",
 
1458
  },
1459
  "issue_severity": "MEDIUM",
1460
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1461
+ "line_number": 128,
1462
  "line_range": [
1463
+ 128
1464
  ],
1465
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1466
  "test_id": "B310",
1467
  "test_name": "blacklist"
1468
  },
1469
  {
1470
+ "code": "134 if url_or_path.startswith((\"http://\", \"https://\", \"ftp://\")):\n135 with urllib.request.urlopen(url_or_path) as resp:\n136 raw = resp.read()\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1471
  "col_offset": 13,
1472
  "end_col_offset": 48,
1473
  "filename": "src/workflows/geo.py",
 
1478
  },
1479
  "issue_severity": "MEDIUM",
1480
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1481
+ "line_number": 135,
1482
  "line_range": [
1483
+ 135
1484
  ],
1485
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1486
  "test_id": "B310",
1487
  "test_name": "blacklist"
1488
  },
1489
  {
1490
+ "code": "310 \n311 with _ur.urlopen(resolved) as resp:\n312 raw = resp.read()\n",
1491
  "col_offset": 9,
1492
  "end_col_offset": 30,
1493
  "filename": "src/workflows/geo.py",
 
1498
  },
1499
  "issue_severity": "MEDIUM",
1500
  "issue_text": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
1501
+ "line_number": 311,
1502
  "line_range": [
1503
+ 311
1504
  ],
1505
  "more_info": "https://bandit.readthedocs.io/en/1.9.4/blacklists/blacklist_calls.html#b310-urllib-urlopen",
1506
  "test_id": "B310",
1507
  "test_name": "blacklist"
1508
  }
1509
  ]
1510
+ }