forked from dremio/dbt-dremio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.txt
831 lines (773 loc) · 39.2 KB
/
output.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
bandit...................................................................[41mFailed[m
[2m- hook id: bandit[m
[2m- exit code: 1[m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[95mRun started:2022-11-30 02:48:16.798964[0m
[95m
Test results:[0m
[94m>> Issue: [B105:hardcoded_password_string] Possible hardcoded password: 'test_sw_up_options'
Severity: Low Confidence: Medium
CWE: CWE-259 (https://cwe.mitre.org/data/definitions/259.html)
Location: tests/component/test_profile_template.py:47:51
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b105_hardcoded_password_string.html[0m
46 _TEST_CLOUD_PROFILE_PROJECT = "test_cloud_options"
47 _TEST_SOFTWARE_USER_PASSWORD_PROFILE_PROJECT = "test_sw_up_options"
48 _TEST_SOFTWARE_PAT_PROFILE_PROJECT = "test_sw_pat_options"
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/component/test_profile_template.py:121:12
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
120 for option, alias in self._PROFILE_OPTIONS_ALIASES.items():
121 assert credential_option_aliases[option] is not None
122 assert alias == credential_option_aliases[option]
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/component/test_profile_template.py:122:12
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
121 assert credential_option_aliases[option] is not None
122 assert alias == credential_option_aliases[option]
123
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/component/test_profile_template.py:136:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
135
136 assert test_project is not None
137
138 for option in test_options:
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/component/test_profile_template.py:139:12
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
138 for option in test_options:
139 assert test_project[option] is not None
140 if test_options[option] is not None:
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/component/test_profile_template.py:141:16
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
140 if test_options[option] is not None:
141 assert test_project[option] == test_options[option]
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_singular_tests.py:26:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
25 results = run_dbt(["test"], expect_pass=False)
26 assert len(results) == 2
27
28 # We have the right result nodes
29 check_result_nodes_by_name(results, ["passing", "failing"])
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_singular_tests.py:34:16
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
33 if result.node.name == "passing":
34 assert result.status == "pass"
35 elif result.node.name == "failing":
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_singular_tests.py:36:16
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
35 elif result.node.name == "failing":
36 assert result.status == "fail"
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/utils/util.py:113:16
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
112 if relation.identifier == key:
113 assert relation.type == value, (
114 f"Got an unexpected relation type of {relation.type} "
115 f"for relation {key}, expected {value}"
116 )
--------------------------------------------------
[95m
Code scanned:[0m
Total lines of code: 436
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 10
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 1
High: 9
[95mFiles skipped (0):[0m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[95mRun started:2022-11-30 02:48:16.793743[0m
[95m
Test results:[0m
No issues identified.
[95m
Code scanned:[0m
Total lines of code: 285
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 0
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 0
[95mFiles skipped (0):[0m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[95mRun started:2022-11-30 02:48:16.783176[0m
[95m
Test results:[0m
No issues identified.
[95m
Code scanned:[0m
Total lines of code: 198
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 0
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 0
[95mFiles skipped (0):[0m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[95mRun started:2022-11-30 02:48:16.803633[0m
[95m
Test results:[0m
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:50:4
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
49 catalog_path = os.path.join(project.project_root, "target", "catalog.json")
50 assert os.path.exists(catalog_path)
51 catalog = get_artifact(catalog_path)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:54:4
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
53 # verify the catalog
54 assert set(catalog) == {"errors", "metadata", "nodes", "sources"}
55 verify_metadata(
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:60:4
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
59 )
60 assert not catalog["errors"]
61 key = "nodes"
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:65:12
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
64 for node_key in expected_node:
65 assert node_key in found_node
66 assert (
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:66:12
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
65 assert node_key in found_node
66 assert (
67 found_node[node_key] == expected_node[node_key]
68 ), f"Key '{node_key}' in '{unique_id}' did not match"
69
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:147:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
146 start_time = run_and_generate(project, ["--no-compile"])
147 assert not os.path.exists(
148 os.path.join(project.project_root, "target", "manifest.json")
149 )
150 verify_catalog_nodes(project, expected_catalog, start_time)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:158:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
157 # Check that assets have been copied to the target directory for use in the docs html page
158 assert os.path.exists(os.path.join(".", "target", "assets"))
159 assert os.path.exists(os.path.join(".", "target", "assets", "lorem-ipsum.txt"))
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:159:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
158 assert os.path.exists(os.path.join(".", "target", "assets"))
159 assert os.path.exists(os.path.join(".", "target", "assets", "lorem-ipsum.txt"))
160 assert not os.path.exists(os.path.join(".", "target", "non-existent-assets"))
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_docs_generate.py:160:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
159 assert os.path.exists(os.path.join(".", "target", "assets", "lorem-ipsum.txt"))
160 assert not os.path.exists(os.path.join(".", "target", "non-existent-assets"))
161
--------------------------------------------------
[95m
Code scanned:[0m
Total lines of code: 387
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 9
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 9
[95mFiles skipped (0):[0m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[95mRun started:2022-11-30 02:48:16.797557[0m
[95m
Test results:[0m
No issues identified.
[95m
Code scanned:[0m
Total lines of code: 290
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 0
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 0
[95mFiles skipped (0):[0m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[95mRun started:2022-11-30 02:48:16.809878[0m
[95m
Test results:[0m
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:40:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
39 select_privilege_name = self.privilege_grantee_name_overrides()["select"]
40 assert len(test_users) == 3
41
42 # View materialization, single select grant
43 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:44:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
43 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
44 assert len(results) == 1
45 manifest = get_manifest(project.project_root)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:49:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
48 expected = {select_privilege_name: [test_users[0]]}
49 assert model.config.grants == expected
50 assert model.config.materialized == "view"
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:50:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
49 assert model.config.grants == expected
50 assert model.config.materialized == "view"
51 self.assert_expected_grants_match_actual(project, "my_model", expected)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:57:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
56 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
57 assert len(results) == 1
58 expected = {select_privilege_name: [get_test_users[1]]}
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:80:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
79 insert_privilege_name = self.privilege_grantee_name_overrides()["insert"]
80 assert len(test_users) == 3
81 # Table materialization, single select grant
82 updated_yaml = self.interpolate_name_overrides(table_model_schema_yml)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:85:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
84 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
85 assert len(results) == 1
86 manifest = get_manifest(project.project_root)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:89:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
88 model = manifest.nodes[model_id]
89 assert model.config.materialized == "table"
90 expected = {select_privilege_name: [test_users[0]]}
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:97:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
96 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
97 assert len(results) == 1
98 manifest = get_manifest(project.project_root)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:100:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
99 model = manifest.nodes[model_id]
100 assert model.config.materialized == "table"
101 expected = {select_privilege_name: [test_users[1]]}
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:110:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
109 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
110 assert len(results) == 1
111 manifest = get_manifest(project.project_root)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:113:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
112 model = manifest.nodes[model_id]
113 assert model.config.materialized == "table"
114 expected = {select_privilege_name: [test_users[0], test_users[1]]}
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:123:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
122 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
123 assert len(results) == 1
124 manifest = get_manifest(project.project_root)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_model_grants.py:126:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
125 model = manifest.nodes[model_id]
126 assert model.config.materialized == "table"
127 expected = {
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/unit/test_connection.py:48:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
47 # Assert
48 assert mocked_post_func.call_count == TOTAL_CONNECTION_ATTEMPTS
--------------------------------------------------
[95m
Code scanned:[0m
Total lines of code: 334
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 15
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 15
[95mFiles skipped (0):[0m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[node_visitor] WARNING Unable to find qualified name for module: setup.py
[95mRun started:2022-11-30 02:48:16.785126[0m
[95m
Test results:[0m
No issues identified.
[95m
Code scanned:[0m
Total lines of code: 97
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 0
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 0
[95mFiles skipped (0):[0m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[95mRun started:2022-11-30 02:48:16.804530[0m
[95m
Test results:[0m
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_base_mat.py:103:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
102 # seed result length
103 assert len(results) == 1
104
105 # run command
106 results = run_dbt()
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_base_mat.py:108:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
107 # run result length
108 assert len(results) == 3
109
110 # names exist in result nodes
111 check_result_nodes_by_name(results, ["view_model", "table_model", "swappable"])
--------------------------------------------------
[93m>> Issue: [B608:hardcoded_sql_expressions] Possible SQL injection vector through string-based query construction.
Severity: Medium Confidence: Low
CWE: CWE-89 (https://cwe.mitre.org/data/definitions/89.html)
Location: tests/functional/adapter/basic/test_base_mat.py:125:12
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b608_hardcoded_sql_expressions.html[0m
124 result = project.run_sql(
125 f"select count(*) as num_rows from {relation}", fetch="one"
126 )
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_base_mat.py:127:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
126 )
127 assert result[0] == 10
128
129 # relations_equal
130 check_relations_equal(
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_base_mat.py:136:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
135 catalog = run_dbt(["docs", "generate"])
136 assert len(catalog.nodes) == 4
137 assert len(catalog.sources) == 1
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_base_mat.py:137:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
136 assert len(catalog.nodes) == 4
137 assert len(catalog.sources) == 1
138
139 # run_dbt changing materialized_var to view
140 # required for BigQuery
141 if project.test_config.get("require_full_refresh", False):
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_base_mat.py:156:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
155 )
156 assert len(results) == 1
157 # check relation types, swappable is view
158 expected = {
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/basic/test_base_mat.py:177:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
176 )
177 assert len(results) == 1
178
179 # check relation types, swappable is table
180 expected = {
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:47:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
46 select_privilege_name = self.privilege_grantee_name_overrides()["select"]
47 assert len(test_users) == 3
48
49 # Incremental materialization, single select grant
50 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:51:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
50 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
51 assert len(results) == 1
52 manifest = get_manifest(project.project_root)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:55:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
54 model = manifest.nodes[model_id]
55 assert model.config.materialized == "incremental"
56 expected = {select_privilege_name: [test_users[0]]}
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:63:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
62 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
63 assert len(results) == 1
64 assert "revoke " not in log_output
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:64:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
63 assert len(results) == 1
64 assert "revoke " not in log_output
65 assert (
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:65:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
64 assert "revoke " not in log_output
65 assert (
66 "grant " not in log_output
67 ) # with space to disambiguate from 'show grants'
68 self.assert_expected_grants_match_actual(
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:78:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
77 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
78 assert len(results) == 1
79 assert "revoke " in log_output
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:79:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
78 assert len(results) == 1
79 assert "revoke " in log_output
80 manifest = get_manifest(project.project_root)
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:82:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
81 model = manifest.nodes[model_id]
82 assert model.config.materialized == "incremental"
83 expected = {select_privilege_name: [test_users[1]]}
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:90:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
89 run_dbt(["--debug", "run", "--full-refresh"])
90 assert len(results) == 1
91 # whether grants or revokes happened will vary by adapter
92 self.assert_expected_grants_match_actual(
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:104:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
103 (results, log_output) = run_dbt_and_capture(["--debug", "run"])
104 assert len(results) == 1
105 # Need to comment this out, as it looks like the grant is copied over
106 # assert "grant " in log_output
107 assert "revoke " not in log_output
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/grants/test_incremental_grants.py:107:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
106 # assert "grant " in log_output
107 assert "revoke " not in log_output
108 self.assert_expected_grants_match_actual(
--------------------------------------------------
[95m
Code scanned:[0m
Total lines of code: 339
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 19
Medium: 1
High: 0
Total issues (by confidence):
Undefined: 0
Low: 1
Medium: 0
High: 19
[95mFiles skipped (0):[0m
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.10.7
[95mRun started:2022-11-30 02:48:16.793096[0m
[95m
Test results:[0m
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/test_concurrency.py:82:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
81 results = run_dbt(["run"], expect_pass=False)
82 assert len(results) == 7
83 check_relations_equal(project.adapter, ["seed", "view_model"])
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/test_concurrency.py:94:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
93 results, output = run_dbt_and_capture(["run"], expect_pass=False)
94 assert len(results) == 7
95 check_relations_equal(project.adapter, ["seed", "view_model"])
--------------------------------------------------
[94m>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: tests/functional/adapter/test_concurrency.py:102:8
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html[0m
101
102 assert "PASS=5 WARN=0 ERROR=1 SKIP=1 TOTAL=7" in output
--------------------------------------------------
[95m
Code scanned:[0m
Total lines of code: 82
Total lines skipped (#nosec): 0
[95m
Run metrics:[0m
Total issues (by severity):
Undefined: 0
Low: 3
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 3
[95mFiles skipped (0):[0m