mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
add testing files and create create scan command
This commit is contained in:
2
cli/testdata/repos/small/README.md
vendored
Normal file
2
cli/testdata/repos/small/README.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# test
|
||||
This is a repo used for testing gitleaks
|
||||
7
cli/testdata/repos/small/api/api.go
vendored
Normal file
7
cli/testdata/repos/small/api/api.go
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package api
|
||||
|
||||
import "fmt"
|
||||
|
||||
func PrintHello() {
|
||||
fmt.Println("hello")
|
||||
}
|
||||
1
cli/testdata/repos/small/dotGit/COMMIT_EDITMSG
vendored
Normal file
1
cli/testdata/repos/small/dotGit/COMMIT_EDITMSG
vendored
Normal file
@@ -0,0 +1 @@
|
||||
removing secret from foo package
|
||||
1
cli/testdata/repos/small/dotGit/FETCH_HEAD
vendored
Normal file
1
cli/testdata/repos/small/dotGit/FETCH_HEAD
vendored
Normal file
@@ -0,0 +1 @@
|
||||
2e1db472eeba53f06c4026ae4566ea022e36598e branch 'main' of github.com:gitleaks/test
|
||||
1
cli/testdata/repos/small/dotGit/HEAD
vendored
Normal file
1
cli/testdata/repos/small/dotGit/HEAD
vendored
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/heads/main
|
||||
1
cli/testdata/repos/small/dotGit/ORIG_HEAD
vendored
Normal file
1
cli/testdata/repos/small/dotGit/ORIG_HEAD
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1b6da43b82b22e4eaa10bcf8ee591e91abbfc587
|
||||
13
cli/testdata/repos/small/dotGit/config
vendored
Normal file
13
cli/testdata/repos/small/dotGit/config
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[remote "origin"]
|
||||
url = git@github.com:gitleaks/test.git
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
[branch "main"]
|
||||
remote = origin
|
||||
merge = refs/heads/main
|
||||
1
cli/testdata/repos/small/dotGit/description
vendored
Normal file
1
cli/testdata/repos/small/dotGit/description
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
BIN
cli/testdata/repos/small/dotGit/index
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/index
vendored
Normal file
Binary file not shown.
6
cli/testdata/repos/small/dotGit/info/exclude
vendored
Normal file
6
cli/testdata/repos/small/dotGit/info/exclude
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# git ls-files --others --exclude-from=.git/info/exclude
|
||||
# Lines that start with '#' are comments.
|
||||
# For a project mostly in C, the following would be a good set of
|
||||
# exclude patterns (uncomment them if you want to use them):
|
||||
# *.[oa]
|
||||
# *~
|
||||
13
cli/testdata/repos/small/dotGit/logs/HEAD
vendored
Normal file
13
cli/testdata/repos/small/dotGit/logs/HEAD
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
0000000000000000000000000000000000000000 1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 Zach Rice <zricer@protonmail.com> 1635896329 -0500 clone: from github.com:gitleaks/test.git
|
||||
1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 Zach Rice <zricer@protonmail.com> 1635896362 -0500 checkout: moving from main to remove-secrets
|
||||
1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 906335481df9a4b48906c90318b4fac76b67fe73 Zach Rice <zricer@protonmail.com> 1635896426 -0500 commit: load token via env var
|
||||
906335481df9a4b48906c90318b4fac76b67fe73 a122b33c6bad3ee54724f52f2caad385ab1982ab Zach Rice <zricer@protonmail.com> 1635896518 -0500 commit: add api package
|
||||
a122b33c6bad3ee54724f52f2caad385ab1982ab a122b33c6bad3ee54724f52f2caad385ab1982ab Zach Rice <zricer@protonmail.com> 1635896543 -0500 checkout: moving from remove-secrets to api-pkg
|
||||
a122b33c6bad3ee54724f52f2caad385ab1982ab 1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 Zach Rice <zricer@protonmail.com> 1635896644 -0500 checkout: moving from api-pkg to main
|
||||
1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 2e1db472eeba53f06c4026ae4566ea022e36598e Zach Rice <zricer@protonmail.com> 1635896648 -0500 pull origin main: Fast-forward
|
||||
2e1db472eeba53f06c4026ae4566ea022e36598e 2e1db472eeba53f06c4026ae4566ea022e36598e Zach Rice <zricer@protonmail.com> 1635896716 -0500 checkout: moving from main to foo
|
||||
2e1db472eeba53f06c4026ae4566ea022e36598e 491504d5a31946ce75e22554cc34203d8e5ff3ca Zach Rice <zricer@protonmail.com> 1635896886 -0500 commit: adding foo package with secret
|
||||
491504d5a31946ce75e22554cc34203d8e5ff3ca f1b58b97808f8e744f6a23c693859df5b5968901 Zach Rice <zricer@protonmail.com> 1635896931 -0500 commit: removing secret from foo package
|
||||
f1b58b97808f8e744f6a23c693859df5b5968901 2e1db472eeba53f06c4026ae4566ea022e36598e Zach Rice <zricer@protonmail.com> 1635897009 -0500 checkout: moving from foo to main
|
||||
2e1db472eeba53f06c4026ae4566ea022e36598e f1b58b97808f8e744f6a23c693859df5b5968901 Zach Rice <zricer@protonmail.com> 1635897062 -0500 checkout: moving from main to foo
|
||||
f1b58b97808f8e744f6a23c693859df5b5968901 2e1db472eeba53f06c4026ae4566ea022e36598e Zach Rice <zricer@protonmail.com> 1635897508 -0500 checkout: moving from foo to main
|
||||
1
cli/testdata/repos/small/dotGit/logs/refs/heads/api-pkg
vendored
Normal file
1
cli/testdata/repos/small/dotGit/logs/refs/heads/api-pkg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 a122b33c6bad3ee54724f52f2caad385ab1982ab Zach Rice <zricer@protonmail.com> 1635896543 -0500 branch: Created from HEAD
|
||||
3
cli/testdata/repos/small/dotGit/logs/refs/heads/foo
vendored
Normal file
3
cli/testdata/repos/small/dotGit/logs/refs/heads/foo
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
0000000000000000000000000000000000000000 2e1db472eeba53f06c4026ae4566ea022e36598e Zach Rice <zricer@protonmail.com> 1635896716 -0500 branch: Created from HEAD
|
||||
2e1db472eeba53f06c4026ae4566ea022e36598e 491504d5a31946ce75e22554cc34203d8e5ff3ca Zach Rice <zricer@protonmail.com> 1635896886 -0500 commit: adding foo package with secret
|
||||
491504d5a31946ce75e22554cc34203d8e5ff3ca f1b58b97808f8e744f6a23c693859df5b5968901 Zach Rice <zricer@protonmail.com> 1635896931 -0500 commit: removing secret from foo package
|
||||
2
cli/testdata/repos/small/dotGit/logs/refs/heads/main
vendored
Normal file
2
cli/testdata/repos/small/dotGit/logs/refs/heads/main
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
0000000000000000000000000000000000000000 1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 Zach Rice <zricer@protonmail.com> 1635896329 -0500 clone: from github.com:gitleaks/test.git
|
||||
1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 2e1db472eeba53f06c4026ae4566ea022e36598e Zach Rice <zricer@protonmail.com> 1635896648 -0500 pull origin main: Fast-forward
|
||||
3
cli/testdata/repos/small/dotGit/logs/refs/heads/remove-secrets
vendored
Normal file
3
cli/testdata/repos/small/dotGit/logs/refs/heads/remove-secrets
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
0000000000000000000000000000000000000000 1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 Zach Rice <zricer@protonmail.com> 1635896362 -0500 branch: Created from HEAD
|
||||
1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 906335481df9a4b48906c90318b4fac76b67fe73 Zach Rice <zricer@protonmail.com> 1635896426 -0500 commit: load token via env var
|
||||
906335481df9a4b48906c90318b4fac76b67fe73 a122b33c6bad3ee54724f52f2caad385ab1982ab Zach Rice <zricer@protonmail.com> 1635896518 -0500 commit: add api package
|
||||
1
cli/testdata/repos/small/dotGit/logs/refs/remotes/origin/HEAD
vendored
Normal file
1
cli/testdata/repos/small/dotGit/logs/refs/remotes/origin/HEAD
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 Zach Rice <zricer@protonmail.com> 1635896329 -0500 clone: from github.com:gitleaks/test.git
|
||||
1
cli/testdata/repos/small/dotGit/logs/refs/remotes/origin/api-pkg
vendored
Normal file
1
cli/testdata/repos/small/dotGit/logs/refs/remotes/origin/api-pkg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 a122b33c6bad3ee54724f52f2caad385ab1982ab Zach Rice <zricer@protonmail.com> 1635896552 -0500 update by push
|
||||
1
cli/testdata/repos/small/dotGit/logs/refs/remotes/origin/foo
vendored
Normal file
1
cli/testdata/repos/small/dotGit/logs/refs/remotes/origin/foo
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 f1b58b97808f8e744f6a23c693859df5b5968901 Zach Rice <zricer@protonmail.com> 1635896935 -0500 update by push
|
||||
1
cli/testdata/repos/small/dotGit/logs/refs/remotes/origin/main
vendored
Normal file
1
cli/testdata/repos/small/dotGit/logs/refs/remotes/origin/main
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 2e1db472eeba53f06c4026ae4566ea022e36598e Zach Rice <zricer@protonmail.com> 1635896648 -0500 pull origin main: fast-forward
|
||||
1
cli/testdata/repos/small/dotGit/objects/02/d85657604c34e7b7fbb324a0c6c8b13c2c3760
vendored
Normal file
1
cli/testdata/repos/small/dotGit/objects/02/d85657604c34e7b7fbb324a0c6c8b13c2c3760
vendored
Normal file
@@ -0,0 +1 @@
|
||||
xU<>1<0B>0`<60>ܯ8nJ<6E><4A>.<2E><><EFBFBD>:*(8<><38>\<5C><>ɕ$<24> <20>w3 Nox<6F>{<7B>$6<>f1<66>~<7E>wF'0<>YbF
|
||||
BIN
cli/testdata/repos/small/dotGit/objects/15/2888a42422b2ff5868b8d003d626120a9cb738
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/15/2888a42422b2ff5868b8d003d626120a9cb738
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/2e/1db472eeba53f06c4026ae4566ea022e36598e
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/2e/1db472eeba53f06c4026ae4566ea022e36598e
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/49/1504d5a31946ce75e22554cc34203d8e5ff3ca
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/49/1504d5a31946ce75e22554cc34203d8e5ff3ca
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/5c/547e4215d9594c3935bdfefdf4f500016a4112
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/5c/547e4215d9594c3935bdfefdf4f500016a4112
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/78/9ba677976d5db481de55c799d67acbf8e3f16a
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/78/9ba677976d5db481de55c799d67acbf8e3f16a
vendored
Normal file
Binary file not shown.
3
cli/testdata/repos/small/dotGit/objects/90/6335481df9a4b48906c90318b4fac76b67fe73
vendored
Normal file
3
cli/testdata/repos/small/dotGit/objects/90/6335481df9a4b48906c90318b4fac76b67fe73
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
x<01><>M
|
||||
<EFBFBD>0F]<5D>s%<25><>t
|
||||
"<22><><EFBFBD><EFBFBD>I2<49>E۔<10><><EFBFBD><EFBFBD><0C>>x<>_<><5F>2w@;<3B>z㑈ءC<D8A1>X<EFBFBD><58>@<40><><EFBFBD>65<>)<0E><><EFBFBD>M<EFBFBD>&<26><><EFBFBD>F:l'<27>F<EFBFBD>THďFF<46>1<EFBFBD><31>iP<69><50>Sm<53><6D>4<EFBFBD>cN<02>o;<3B>ݷV{]<17>ߗT<DF97><1B>`=<3D><>a<EFBFBD><61><EFBFBD>Z<EFBFBD><5A><17><><15>w<EFBFBD><0C><>d<EFBFBD>}f<>u<EFBFBD><75><EFBFBD><EFBFBD>KK<4B>
|
||||
BIN
cli/testdata/repos/small/dotGit/objects/9a/932e37eaa9fb64b09e47e5e859c9b2c8cb47ad
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/9a/932e37eaa9fb64b09e47e5e859c9b2c8cb47ad
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/a1/22b33c6bad3ee54724f52f2caad385ab1982ab
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/a1/22b33c6bad3ee54724f52f2caad385ab1982ab
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/a5/caae6d742e49a33982f1fdc608ce861ea59be5
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/a5/caae6d742e49a33982f1fdc608ce861ea59be5
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/a9/aa0c942dcef669a94f207a77426106b25efd1a
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/a9/aa0c942dcef669a94f207a77426106b25efd1a
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/bc/f47ef84f29bb7ed6e653d61fccd30d0ecce886
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/bc/f47ef84f29bb7ed6e653d61fccd30d0ecce886
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/d8/32479114dc6be7207edc7c37ce91dd11b93161
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/d8/32479114dc6be7207edc7c37ce91dd11b93161
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/da/2622b4d97e32c5801511244b809144b6b3ea78
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/da/2622b4d97e32c5801511244b809144b6b3ea78
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/e5/c0849a65c586eab87dcfc31fec74f0fd7c62cb
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/e5/c0849a65c586eab87dcfc31fec74f0fd7c62cb
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/f1/b58b97808f8e744f6a23c693859df5b5968901
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/f1/b58b97808f8e744f6a23c693859df5b5968901
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/pack/pack-2cdc2976b84768d0829c75cc8d8fc4d849be62cd.idx
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/pack/pack-2cdc2976b84768d0829c75cc8d8fc4d849be62cd.idx
vendored
Normal file
Binary file not shown.
BIN
cli/testdata/repos/small/dotGit/objects/pack/pack-2cdc2976b84768d0829c75cc8d8fc4d849be62cd.pack
vendored
Normal file
BIN
cli/testdata/repos/small/dotGit/objects/pack/pack-2cdc2976b84768d0829c75cc8d8fc4d849be62cd.pack
vendored
Normal file
Binary file not shown.
2
cli/testdata/repos/small/dotGit/packed-refs
vendored
Normal file
2
cli/testdata/repos/small/dotGit/packed-refs
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# pack-refs with: peeled fully-peeled sorted
|
||||
1b6da43b82b22e4eaa10bcf8ee591e91abbfc587 refs/remotes/origin/main
|
||||
1
cli/testdata/repos/small/dotGit/refs/heads/api-pkg
vendored
Normal file
1
cli/testdata/repos/small/dotGit/refs/heads/api-pkg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
a122b33c6bad3ee54724f52f2caad385ab1982ab
|
||||
1
cli/testdata/repos/small/dotGit/refs/heads/foo
vendored
Normal file
1
cli/testdata/repos/small/dotGit/refs/heads/foo
vendored
Normal file
@@ -0,0 +1 @@
|
||||
f1b58b97808f8e744f6a23c693859df5b5968901
|
||||
1
cli/testdata/repos/small/dotGit/refs/heads/main
vendored
Normal file
1
cli/testdata/repos/small/dotGit/refs/heads/main
vendored
Normal file
@@ -0,0 +1 @@
|
||||
2e1db472eeba53f06c4026ae4566ea022e36598e
|
||||
1
cli/testdata/repos/small/dotGit/refs/heads/remove-secrets
vendored
Normal file
1
cli/testdata/repos/small/dotGit/refs/heads/remove-secrets
vendored
Normal file
@@ -0,0 +1 @@
|
||||
a122b33c6bad3ee54724f52f2caad385ab1982ab
|
||||
1
cli/testdata/repos/small/dotGit/refs/remotes/origin/HEAD
vendored
Normal file
1
cli/testdata/repos/small/dotGit/refs/remotes/origin/HEAD
vendored
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/remotes/origin/main
|
||||
1
cli/testdata/repos/small/dotGit/refs/remotes/origin/api-pkg
vendored
Normal file
1
cli/testdata/repos/small/dotGit/refs/remotes/origin/api-pkg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
a122b33c6bad3ee54724f52f2caad385ab1982ab
|
||||
1
cli/testdata/repos/small/dotGit/refs/remotes/origin/foo
vendored
Normal file
1
cli/testdata/repos/small/dotGit/refs/remotes/origin/foo
vendored
Normal file
@@ -0,0 +1 @@
|
||||
f1b58b97808f8e744f6a23c693859df5b5968901
|
||||
1
cli/testdata/repos/small/dotGit/refs/remotes/origin/main
vendored
Normal file
1
cli/testdata/repos/small/dotGit/refs/remotes/origin/main
vendored
Normal file
@@ -0,0 +1 @@
|
||||
2e1db472eeba53f06c4026ae4566ea022e36598e
|
||||
27
cli/testdata/repos/small/main.go
vendored
Normal file
27
cli/testdata/repos/small/main.go
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
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)
|
||||
|
||||
// load secret via env
|
||||
awsToken := os.Getenv("AWS_TOKEN")
|
||||
|
||||
f := "apple"
|
||||
fmt.Println(f)
|
||||
}
|
||||
Reference in New Issue
Block a user