File tree Expand file tree Collapse file tree
linters/gitleaks/test_data Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11aws_access_key_id = "AKIAIO5FODNN7EXAMPLE"
22
3+ aws_token = "AKIALALEMEL33243OLIA"
34
4- aws_access_key_id = "AKIAIO5FODNN7EXAMPLE"
5+ private_key = """-----BEGIN OPENSSH PRIVATE KEY-----
6+ b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
7+ QyNTUxOQAAACA8YWKYztuuvxUIMomc3zv0OdXCT57Cc2cRYu3TMbX9XAAAAJDiKO3C4ijt
8+ wgAAAAtzc2gtZWQyNTUxOQAAACA8YWKYztuuvxUIMomc3zv0OdXCT57Cc2cRYu3TMbX9XA
9+ AAAECzmj8DGxg5YHtBK4AmBttMXDQHsPAaCyYHQjJ4YujRBTxhYpjO266/FQgyiZzfO/Q5
10+ 1cJPnsJzZxFi7dMxtf1cAAAADHJvb3RAZGV2aG9zdAE=
11+ -----END OPENSSH PRIVATE KEY-----"""
Original file line number Diff line number Diff line change @@ -23,18 +23,36 @@ exports[`Testing linter gitleaks test basic 1`] = `
2323 },
2424 {
2525 "code": "aws-access-token",
26- "column": "23 ",
26+ "column": "15 ",
2727 "file": "test_data/basic.py",
2828 "issueClass": "ISSUE_CLASS_EXISTING",
2929 "level": "LEVEL_HIGH",
30- "line": "4 ",
30+ "line": "3 ",
3131 "linter": "gitleaks",
3232 "message": "aws-access-token has detected secret for file test_data/basic.py.",
3333 "ranges": [
3434 {
3535 "filePath": "test_data/basic.py",
3636 "length": "19",
37- "offset": "67",
37+ "offset": "58",
38+ },
39+ ],
40+ "targetType": "ALL",
41+ },
42+ {
43+ "code": "OPENSSH-PK",
44+ "column": "19",
45+ "file": "test_data/basic.py",
46+ "issueClass": "ISSUE_CLASS_EXISTING",
47+ "level": "LEVEL_HIGH",
48+ "line": "5",
49+ "linter": "gitleaks",
50+ "message": "OPENSSH-PK has detected secret for file test_data/basic.py.",
51+ "ranges": [
52+ {
53+ "filePath": "test_data/basic.py",
54+ "length": "34",
55+ "offset": "98",
3856 },
3957 ],
4058 "targetType": "ALL",
Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2+ // trunk-upgrade-validation:RELEASE
3+
4+ exports[`Testing linter gitleaks test basic 1`] = `
5+ {
6+ "issues": [
7+ {
8+ "code": "aws-access-token",
9+ "column": "15",
10+ "file": "test_data/basic.py",
11+ "issueClass": "ISSUE_CLASS_EXISTING",
12+ "level": "LEVEL_HIGH",
13+ "line": "3",
14+ "linter": "gitleaks",
15+ "message": "aws-access-token has detected secret for file test_data/basic.py.",
16+ "ranges": [
17+ {
18+ "filePath": "test_data/basic.py",
19+ "length": "20",
20+ "offset": "58",
21+ },
22+ ],
23+ "targetType": "ALL",
24+ },
25+ {
26+ "code": "private-key",
27+ "column": "19",
28+ "file": "test_data/basic.py",
29+ "issueClass": "ISSUE_CLASS_EXISTING",
30+ "level": "LEVEL_HIGH",
31+ "line": "5",
32+ "linter": "gitleaks",
33+ "message": "private-key has detected secret for file test_data/basic.py.",
34+ "ranges": [
35+ {
36+ "filePath": "test_data/basic.py",
37+ "length": "397",
38+ "offset": "98",
39+ },
40+ ],
41+ "targetType": "ALL",
42+ },
43+ ],
44+ "lintActions": [
45+ {
46+ "command": "lint",
47+ "fileGroupName": "ALL",
48+ "linter": "gitleaks",
49+ "paths": [
50+ "test_data/basic.py",
51+ ],
52+ "verb": "TRUNK_VERB_CHECK",
53+ },
54+ {
55+ "command": "lint",
56+ "fileGroupName": "ALL",
57+ "linter": "gitleaks",
58+ "paths": [
59+ "test_data/basic.py",
60+ ],
61+ "upstream": true,
62+ "verb": "TRUNK_VERB_CHECK",
63+ },
64+ ],
65+ "taskFailures": [],
66+ "unformattedFiles": [],
67+ }
68+ `;
Original file line number Diff line number Diff line change @@ -23,18 +23,36 @@ exports[`Testing linter gitleaks test basic 1`] = `
2323 },
2424 {
2525 "code": "aws-access-token",
26- "column": "23 ",
26+ "column": "15 ",
2727 "file": "test_data/basic.py",
2828 "issueClass": "ISSUE_CLASS_EXISTING",
2929 "level": "LEVEL_HIGH",
30- "line": "4 ",
30+ "line": "3 ",
3131 "linter": "gitleaks",
3232 "message": "aws-access-token has detected secret for file test_data/basic.py.",
3333 "ranges": [
3434 {
3535 "filePath": "test_data/basic.py",
3636 "length": "19",
37- "offset": "67",
37+ "offset": "58",
38+ },
39+ ],
40+ "targetType": "ALL",
41+ },
42+ {
43+ "code": "private-key",
44+ "column": "19",
45+ "file": "test_data/basic.py",
46+ "issueClass": "ISSUE_CLASS_EXISTING",
47+ "level": "LEVEL_HIGH",
48+ "line": "5",
49+ "linter": "gitleaks",
50+ "message": "private-key has detected secret for file test_data/basic.py.",
51+ "ranges": [
52+ {
53+ "filePath": "test_data/basic.py",
54+ "length": "396",
55+ "offset": "98",
3856 },
3957 ],
4058 "targetType": "ALL",
You can’t perform that action at this time.
0 commit comments