chore: import upstream snapshot with attribution
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
// seems safer
|
||||
aws_token := os.Getenv("AWS_TOKEN")
|
||||
package foo
|
||||
|
||||
import "fmt"
|
||||
|
||||
func Foo() {
|
||||
fmt.Println("foo")
|
||||
|
||||
// seems safe
|
||||
aws_token := "AKIALALEMEL33243OLIA"
|
||||
fmt.Println(aws_token)
|
||||
}
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
// seems safer
|
||||
aws_token := os.Getenv("AWS_TOKEN")
|
||||
package foo
|
||||
|
||||
import "fmt"
|
||||
|
||||
func Foo() {
|
||||
fmt.Println("foo")
|
||||
|
||||
// seems safe
|
||||
aws_token := "AKIALALEMEL33243OLIA"
|
||||
fmt.Println(aws_token)
|
||||
}
|
||||
package api
|
||||
|
||||
import "fmt"
|
||||
|
||||
func PrintHello() {
|
||||
fmt.Println("hello")
|
||||
}
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
var a = "initial"
|
||||
fmt.Println(a)
|
||||
var b, c int = 1, 2
|
||||
fmt.Println(b, c)
|
||||
var d = true
|
||||
fmt.Println(d)
|
||||
var e int
|
||||
fmt.Println(e)
|
||||
// load secret via env
|
||||
awsToken := os.Getenv("AWS_TOKEN")
|
||||
|
||||
f := "apple"
|
||||
fmt.Println(f)
|
||||
|
||||
// opps I added a secret at line 20
|
||||
awsToken := "AKIALALEMEL33243OLIA"
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
|
||||
var a = "initial"
|
||||
fmt.Println(a)
|
||||
|
||||
var b, c int = 1, 2
|
||||
fmt.Println(b, c)
|
||||
|
||||
var d = true
|
||||
fmt.Println(d)
|
||||
|
||||
var e int
|
||||
fmt.Println(e)
|
||||
|
||||
f := "apple"
|
||||
fmt.Println(f)
|
||||
}
|
||||
# test
|
||||
This is a repo used for testing gitleaks
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
RuleID,Commit,File,SymlinkFile,Secret,Match,StartLine,EndLine,StartColumn,EndColumn,Author,Message,Date,Email,Fingerprint,Tags
|
||||
test-rule,0000000000000000,auth.py,,a secret,line containing secret,1,2,1,2,John Doe,opps,10-19-2003,johndoe@gmail.com,fingerprint,tag1 tag2 tag3
|
||||
|
Vendored
+1
@@ -0,0 +1 @@
|
||||
[]
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"RuleID": "test-rule",
|
||||
"Description": "",
|
||||
"StartLine": 1,
|
||||
"EndLine": 2,
|
||||
"StartColumn": 1,
|
||||
"EndColumn": 2,
|
||||
"Match": "line containing secret",
|
||||
"Secret": "a secret",
|
||||
"File": "auth.py",
|
||||
"SymlinkFile": "",
|
||||
"Commit": "0000000000000000",
|
||||
"Entropy": 0,
|
||||
"Author": "John Doe",
|
||||
"Email": "johndoe@gmail.com",
|
||||
"Date": "10-19-2003",
|
||||
"Message": "opps",
|
||||
"Tags": [],
|
||||
"Fingerprint": ""
|
||||
}
|
||||
]
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites>
|
||||
<testsuite failures="0" name="gitleaks" tests="0" time=""></testsuite>
|
||||
</testsuites>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites>
|
||||
<testsuite failures="2" name="gitleaks" tests="2" time="">
|
||||
<testcase classname="Test Rule" file="auth.py" name="test-rule has detected a secret in file auth.py, line 1, at commit 0000000000000000." time="">
|
||||
<failure message="test-rule has detected a secret in file auth.py, line 1, at commit 0000000000000000." type="Test Rule">{
	"RuleID": "test-rule",
	"Description": "Test Rule",
	"StartLine": 1,
	"EndLine": 2,
	"StartColumn": 1,
	"EndColumn": 2,
	"Match": "line containing secret",
	"Secret": "a secret",
	"File": "auth.py",
	"SymlinkFile": "",
	"Commit": "0000000000000000",
	"Entropy": 0,
	"Author": "John Doe",
	"Email": "johndoe@gmail.com",
	"Date": "10-19-2003",
	"Message": "opps",
	"Tags": [],
	"Fingerprint": ""
}</failure>
|
||||
</testcase>
|
||||
<testcase classname="Test Rule" file="auth.py" name="test-rule has detected a secret in file auth.py, line 2." time="">
|
||||
<failure message="test-rule has detected a secret in file auth.py, line 2." type="Test Rule">{
	"RuleID": "test-rule",
	"Description": "Test Rule",
	"StartLine": 2,
	"EndLine": 3,
	"StartColumn": 1,
	"EndColumn": 2,
	"Match": "line containing secret",
	"Secret": "a secret",
	"File": "auth.py",
	"SymlinkFile": "",
	"Commit": "",
	"Entropy": 0,
	"Author": "",
	"Email": "",
	"Date": "",
	"Message": "",
	"Tags": [],
	"Fingerprint": ""
}</failure>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",
|
||||
"version": "2.1.0",
|
||||
"runs": [
|
||||
{
|
||||
"tool": {
|
||||
"driver": {
|
||||
"name": "gitleaks",
|
||||
"semanticVersion": "v8.0.0",
|
||||
"informationUri": "https://github.com/gitleaks/gitleaks",
|
||||
"rules": [
|
||||
{
|
||||
"id": "aws-access-key",
|
||||
"shortDescription": {
|
||||
"text": "AWS Access Key"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "pypi",
|
||||
"shortDescription": {
|
||||
"text": "PyPI upload token"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"message": {
|
||||
"text": "test-rule has detected secret for file auth.py at commit 0000000000000000."
|
||||
},
|
||||
"ruleId": "test-rule",
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "auth.py"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endLine": 2,
|
||||
"endColumn": 2,
|
||||
"snippet": {
|
||||
"text": "a secret"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"partialFingerprints": {
|
||||
"commitSha": "0000000000000000",
|
||||
"email": "johndoe@gmail.com",
|
||||
"author": "John Doe",
|
||||
"date": "10-19-2003",
|
||||
"commitMessage": "opps"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"tag1",
|
||||
"tag2",
|
||||
"tag3"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"Description": "A test rule",
|
||||
"StartLine": 1,
|
||||
"EndLine": 2,
|
||||
"StartColumn": 1,
|
||||
"EndColumn": 2,
|
||||
"Line": "whole line containing secret",
|
||||
"Match": "line containing secret",
|
||||
"Secret": "a secret",
|
||||
"File": "auth.py",
|
||||
"SymlinkFile": "",
|
||||
"Commit": "0000000000000000",
|
||||
"Entropy": 0,
|
||||
"Author": "John Doe",
|
||||
"Email": "johndoe@gmail.com",
|
||||
"Date": "10-19-2003",
|
||||
"Message": "opps",
|
||||
"Tags": ["tag1","tag2","tag3"],
|
||||
"RuleID": "test-rule",
|
||||
"Fingerprint": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
| File | Line | Secret |
|
||||
|:-----|-----:|--------|
|
||||
| auth.py | 1 | "a secret" |
|
||||
Reference in New Issue
Block a user