Skip to content

Commit dbf290a

Browse files
committed
Updated hookz configuration
1 parent 456c301 commit dbf290a

File tree

8 files changed

+201
-13
lines changed

8 files changed

+201
-13
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: daily
7+
time: "05:00"
8+
timezone: US/Pacific

.hookz.yaml

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,43 @@
1-
version: 2.4.1
2-
hooks:
3-
- type: pre-commit
4-
actions:
5-
- name: Hello Hookz!
6-
url: null
7-
args:
8-
- -e
9-
- Hello Hookz!
10-
exec: /bin/echo
11-
script: null
12-
sources:
13-
- source: github.com/devops-kung-fu/hinge@latest
1+
version: 2.4.0
2+
sources:
3+
- source: github.com/anchore/syft/cmd/syft@latest
4+
- source: github.com/devops-kung-fu/hinge@latest
5+
- source: github.com/kisielk/errcheck@latest
6+
- source: golang.org/x/lint/golint@latest
7+
- source: github.com/fzipp/gocyclo/cmd/gocyclo@latest
8+
hooks:
9+
- type: pre-commit
10+
actions:
11+
- name: "git: Pull (Ensure there are no upstream changes that are not local)"
12+
exec: git
13+
args: ["pull"]
14+
- name: "go: Tidy mod file"
15+
exec: go
16+
args: ["mod", "tidy"]
17+
- name: "go: Update all dependencies to latest"
18+
exec: go
19+
args: ["get", "-u", "./..."]
20+
- name: "golint: Lint all go files"
21+
exec: golint
22+
args: ["-set_exit_status", "./..."] #to error out, add the arg "-set_exit_status"
23+
- name: "errcheck: Ensure that errors are checked"
24+
exec: errcheck
25+
args: ["-ignoretests", "./..."]
26+
- name: "gocyclo: Check cyclomatic complexities"
27+
exec: gocyclo
28+
args: ["-over", "1", "."]
29+
- name: Hinge
30+
exec: hinge
31+
args: ["."]
32+
- name: "go: Build (Ensure pulled modules do not break the build)"
33+
exec: go
34+
args: ["build", "-v", "./..."]
35+
- name: "go: Run all tests"
36+
exec: go
37+
args: ["test", "-v", "-coverprofile=coverage.out", "./..."]
38+
- name: "go: Test coverage"
39+
exec: go
40+
args: ["tool", "cover", "-func=coverage.out"]
41+
- name: "git: Add all changed files during the pre-commit stage"
42+
exec: git
43+
args: ["add", "."]

coverage.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mode: set

gitkon

1.83 MB
Binary file not shown.

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ func main() {
77
Done()
88
}
99

10+
// Done prints done
1011
func Done() {
1112
fmt.Println("done")
1213
}

sbom/bomber.cyclonedx.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"bomFormat": "CycloneDX",
3+
"specVersion": "1.4",
4+
"serialNumber": "urn:uuid:e8d31f2b-5171-42d5-98ab-0d86a85cf677",
5+
"version": 1,
6+
"metadata": {
7+
"timestamp": "2022-09-23T15:40:57-06:00",
8+
"tools": [
9+
{
10+
"vendor": "anchore",
11+
"name": "syft",
12+
"version": "[not provided]"
13+
}
14+
],
15+
"component": {
16+
"bom-ref": "af63bd4c8601b7f1",
17+
"type": "file",
18+
"name": "."
19+
}
20+
},
21+
"components": []
22+
}

sbom/bomber.spdx.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"SPDXID": "SPDXRef-DOCUMENT",
3+
"name": ".",
4+
"spdxVersion": "SPDX-2.2",
5+
"creationInfo": {
6+
"created": "2022-09-23T21:40:57.000057Z",
7+
"creators": [
8+
"Organization: Anchore, Inc",
9+
"Tool: syft-[not provided]"
10+
],
11+
"licenseListVersion": "3.18"
12+
},
13+
"dataLicense": "CC0-1.0",
14+
"documentNamespace": "https://anchore.com/syft/dir/d5f4d7b8-8731-45e8-ad72-2ca17a99764f",
15+
"packages": []
16+
}

sbom/bomber.syft.json

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"artifacts": [],
3+
"artifactRelationships": [],
4+
"source": {
5+
"type": "directory",
6+
"target": "."
7+
},
8+
"distro": {},
9+
"descriptor": {
10+
"name": "syft",
11+
"version": "[not provided]",
12+
"configuration": {
13+
"configPath": "",
14+
"verbosity": 0,
15+
"quiet": false,
16+
"output": [
17+
"json=sbom/bomber.syft.json",
18+
"spdx-json=sbom/bomber.spdx.json",
19+
"cyclonedx-json=sbom/bomber.cyclonedx.json"
20+
],
21+
"output-template-path": "",
22+
"file": "",
23+
"check-for-app-update": true,
24+
"anchore": {
25+
"host": "",
26+
"path": "",
27+
"dockerfile": "",
28+
"overwrite-existing-image": false,
29+
"import-timeout": 30
30+
},
31+
"dev": {
32+
"profile-cpu": false,
33+
"profile-mem": false
34+
},
35+
"log": {
36+
"structured": false,
37+
"level": "warning",
38+
"file-location": ""
39+
},
40+
"catalogers": null,
41+
"package": {
42+
"cataloger": {
43+
"enabled": true,
44+
"scope": "Squashed"
45+
},
46+
"search-unindexed-archives": false,
47+
"search-indexed-archives": true
48+
},
49+
"file-metadata": {
50+
"cataloger": {
51+
"enabled": false,
52+
"scope": "Squashed"
53+
},
54+
"digests": [
55+
"sha256"
56+
]
57+
},
58+
"file-classification": {
59+
"cataloger": {
60+
"enabled": false,
61+
"scope": "Squashed"
62+
}
63+
},
64+
"file-contents": {
65+
"cataloger": {
66+
"enabled": false,
67+
"scope": "Squashed"
68+
},
69+
"skip-files-above-size": 1048576,
70+
"globs": []
71+
},
72+
"secrets": {
73+
"cataloger": {
74+
"enabled": false,
75+
"scope": "AllLayers"
76+
},
77+
"additional-patterns": {},
78+
"exclude-pattern-names": [],
79+
"reveal-values": false,
80+
"skip-files-above-size": 1048576
81+
},
82+
"registry": {
83+
"insecure-skip-tls-verify": false,
84+
"insecure-use-http": false,
85+
"auth": []
86+
},
87+
"exclude": [],
88+
"attest": {
89+
"key": "",
90+
"cert": "",
91+
"noUpload": false,
92+
"force": false,
93+
"recursive": false,
94+
"replace": false,
95+
"fulcioUrl": "https://fulcio.sigstore.dev",
96+
"fulcio_identity_token": "",
97+
"insecure_skip_verify": false,
98+
"rekorUrl": "https://rekor.sigstore.dev",
99+
"oidcIssuer": "https://oauth2.sigstore.dev/auth",
100+
"oidcClientId": "sigstore",
101+
"OIDCRedirectURL": ""
102+
},
103+
"platform": ""
104+
}
105+
},
106+
"schema": {
107+
"version": "3.3.2",
108+
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.3.2.json"
109+
}
110+
}

0 commit comments

Comments
 (0)