|
| 1 | +{ |
| 2 | + "errors": [], |
| 3 | + "generated_at": "2021-01-07T23:39:39Z", |
| 4 | + "metrics": { |
| 5 | + "./lintly/formatters.py": { |
| 6 | + "CONFIDENCE.HIGH": 1.0, |
| 7 | + "CONFIDENCE.LOW": 0.0, |
| 8 | + "CONFIDENCE.MEDIUM": 0.0, |
| 9 | + "CONFIDENCE.UNDEFINED": 0.0, |
| 10 | + "SEVERITY.HIGH": 1.0, |
| 11 | + "SEVERITY.LOW": 0.0, |
| 12 | + "SEVERITY.MEDIUM": 0.0, |
| 13 | + "SEVERITY.UNDEFINED": 0.0, |
| 14 | + "loc": 31, |
| 15 | + "nosec": 0 |
| 16 | + }, |
| 17 | + "_totals": { |
| 18 | + "CONFIDENCE.HIGH": 6.0, |
| 19 | + "CONFIDENCE.LOW": 0.0, |
| 20 | + "CONFIDENCE.MEDIUM": 0.0, |
| 21 | + "CONFIDENCE.UNDEFINED": 0.0, |
| 22 | + "SEVERITY.HIGH": 2.0, |
| 23 | + "SEVERITY.LOW": 4.0, |
| 24 | + "SEVERITY.MEDIUM": 0.0, |
| 25 | + "SEVERITY.UNDEFINED": 0.0, |
| 26 | + "loc": 2596, |
| 27 | + "nosec": 0 |
| 28 | + } |
| 29 | + }, |
| 30 | + "results": [ |
| 31 | + { |
| 32 | + "code": "13 \n14 env = Environment(\n15 loader=FileSystemLoader(TEMPLATES_PATH),\n16 autoescape=False\n17 )\n", |
| 33 | + "filename": "./build/lib/lintly/formatters.py", |
| 34 | + "issue_confidence": "HIGH", |
| 35 | + "issue_severity": "HIGH", |
| 36 | + "issue_text": "Using jinja2 templates with autoescape=False is dangerous and can lead to XSS. Use autoescape=True or use the select_autoescape function to mitigate XSS vulnerabilities.", |
| 37 | + "line_number": 14, |
| 38 | + "line_range": [ |
| 39 | + 14, |
| 40 | + 15, |
| 41 | + 16 |
| 42 | + ], |
| 43 | + "more_info": "https://bandit.readthedocs.io/en/latest/plugins/b701_jinja2_autoescape_false.html", |
| 44 | + "test_id": "B701", |
| 45 | + "test_name": "jinja2_autoescape_false" |
| 46 | + }, |
| 47 | + { |
| 48 | + "code": "13 \n14 env = Environment(\n15 loader=FileSystemLoader(TEMPLATES_PATH),\n16 autoescape=False\n17 )\n", |
| 49 | + "filename": "./lintly/formatters.py", |
| 50 | + "issue_confidence": "HIGH", |
| 51 | + "issue_severity": "HIGH", |
| 52 | + "issue_text": "Using jinja2 templates with autoescape=False is dangerous and can lead to XSS. Use autoescape=True or use the select_autoescape function to mitigate XSS vulnerabilities.", |
| 53 | + "line_number": 14, |
| 54 | + "line_range": [ |
| 55 | + 14, |
| 56 | + 15, |
| 57 | + 16 |
| 58 | + ], |
| 59 | + "more_info": "https://bandit.readthedocs.io/en/latest/plugins/b701_jinja2_autoescape_false.html", |
| 60 | + "test_id": "B701", |
| 61 | + "test_name": "jinja2_autoescape_false" |
| 62 | + }, |
| 63 | + { |
| 64 | + "code": "47 builds.LintlyBuild(config, \"Some linter output\")\n48 assert GitHubBackend.call_args[1][\"context\"] == format_and_context[2]\n", |
| 65 | + "filename": "./tests/test_builds.py", |
| 66 | + "issue_confidence": "HIGH", |
| 67 | + "issue_severity": "LOW", |
| 68 | + "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", |
| 69 | + "line_number": 48, |
| 70 | + "line_range": [ |
| 71 | + 48 |
| 72 | + ], |
| 73 | + "more_info": "https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html", |
| 74 | + "test_id": "B101", |
| 75 | + "test_name": "assert_used" |
| 76 | + }, |
| 77 | + { |
| 78 | + "code": "12 result = runner.invoke(cli.main, ['--help'])\n13 assert result.exit_code == 0\n14 assert not result.exception\n", |
| 79 | + "filename": "./tests/test_cli.py", |
| 80 | + "issue_confidence": "HIGH", |
| 81 | + "issue_severity": "LOW", |
| 82 | + "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", |
| 83 | + "line_number": 13, |
| 84 | + "line_range": [ |
| 85 | + 13 |
| 86 | + ], |
| 87 | + "more_info": "https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html", |
| 88 | + "test_id": "B101", |
| 89 | + "test_name": "assert_used" |
| 90 | + }, |
| 91 | + { |
| 92 | + "code": "13 assert result.exit_code == 0\n14 assert not result.exception\n15 assert 'Usage' in result.output\n", |
| 93 | + "filename": "./tests/test_cli.py", |
| 94 | + "issue_confidence": "HIGH", |
| 95 | + "issue_severity": "LOW", |
| 96 | + "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", |
| 97 | + "line_number": 14, |
| 98 | + "line_range": [ |
| 99 | + 14 |
| 100 | + ], |
| 101 | + "more_info": "https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html", |
| 102 | + "test_id": "B101", |
| 103 | + "test_name": "assert_used" |
| 104 | + }, |
| 105 | + { |
| 106 | + "code": "14 assert not result.exception\n15 assert 'Usage' in result.output\n16 \n", |
| 107 | + "filename": "./tests/test_cli.py", |
| 108 | + "issue_confidence": "HIGH", |
| 109 | + "issue_severity": "LOW", |
| 110 | + "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", |
| 111 | + "line_number": 15, |
| 112 | + "line_range": [ |
| 113 | + 15 |
| 114 | + ], |
| 115 | + "more_info": "https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html", |
| 116 | + "test_id": "B101", |
| 117 | + "test_name": "assert_used" |
| 118 | + } |
| 119 | + ] |
| 120 | +} |
0 commit comments