-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
446 lines (411 loc) · 14.7 KB
/
Copy path.goreleaser.yaml
File metadata and controls
446 lines (411 loc) · 14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
#
# GoReleaser v2 configuration for opnDossier
# Updated for Cosign v3, keyless signing, and current best practices
#
# See also: .github/workflows/release.yml
# Reference: https://github.com/goreleaser/example-supply-chain
version: 2
project_name: opnDossier
before:
hooks:
- go mod tidy
- go generate ./...
- git-cliff --output CHANGELOG.md
- just notices
# Build binary first for generating documentation
- go build -o ./opndossier-temp ./main.go
# Generate shell completions
- mkdir -p ./packaging/completions
- bash -c './opndossier-temp completion bash > ./packaging/completions/opndossier.bash'
- bash -c './opndossier-temp completion zsh > ./packaging/completions/opndossier.zsh'
- bash -c './opndossier-temp completion fish > ./packaging/completions/opndossier.fish'
- bash -c './opndossier-temp completion powershell > ./packaging/completions/opndossier.ps1'
# Generate man pages
- ./opndossier-temp man ./packaging/
# Clean up temporary binary
- rm ./opndossier-temp
# Build configuration
# https://goreleaser.com/customization/builds/go/
builds:
- id: opndossier
binary: opndossier
main: ./main.go
env:
- CGO_ENABLED=0
goos:
- freebsd
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: freebsd
goarch: arm64
flags:
- -trimpath
ldflags:
# Use CommitDate for reproducible builds
- >-
-s -w
-X main.version={{.Version}}
-X github.com/EvilBit-Labs/opnDossier/cmd.buildDate={{ .CommitDate }}
-X github.com/EvilBit-Labs/opnDossier/cmd.gitCommit={{.Commit}}
# Ensures mod timestamp matches commit for reproducibility
mod_timestamp: "{{ .CommitTimestamp }}"
# NOTE: macOS code signing moved to universal_binaries.hooks.post so it runs
# on the combined universal binary, not the individual arch binaries that
# get replaced by universal_binaries with replace: true.
# Archive configuration
# https://goreleaser.com/customization/archive/
archives:
- id: default
formats: [tar.gz]
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
formats: [zip]
files:
- LICENSE
- README.md
- CHANGELOG.md
- THIRD_PARTY_NOTICES
- src: ./packaging/completions/*
dst: completions
- src: ./packaging/opndossier.1
dst: man/opndossier.1
# Preserve commit timestamp for reproducibility
builds_info:
mtime: "{{ .CommitTimestamp }}"
# Checksum configuration
# https://goreleaser.com/customization/checksum/
checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
# Changelog: git-cliff generates CHANGELOG.md in before hooks
# GoReleaser uses its default git provider for the GitHub Release body
changelog:
use: git
# Release configuration
# https://goreleaser.com/customization/release/
release:
github:
owner: "EvilBit-Labs"
name: "opnDossier"
prerelease: auto
include_meta: true
header: |
## Release {{.Tag}}
This release includes the following changes:
footer: |
**Full Changelog**: https://github.com/EvilBit-Labs/opnDossier/compare/{{.PreviousTag}}...{{.Tag}}
## Security Information
This release includes:
- SBOM (Software Bill of Materials) generated with CycloneDX-gomod
- SLSA Level 3 provenance attestation
- Cosign keyless signatures (Sigstore)
### Verify Signatures
```bash
# Download the checksum file and its signature
wget https://github.com/EvilBit-Labs/opnDossier/releases/download/{{.Tag}}/opnDossier_checksums.txt
wget https://github.com/EvilBit-Labs/opnDossier/releases/download/{{.Tag}}/opnDossier_checksums.txt.sigstore.json
# Verify with cosign v3
cosign verify-blob \
--certificate-identity "https://github.com/EvilBit-Labs/opnDossier/.github/workflows/release.yml@refs/tags/{{.Tag}}" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
--bundle opnDossier_checksums.txt.sigstore.json \
opnDossier_checksums.txt
```
## Installation
### Package Managers
**Debian/Ubuntu (.deb)**:
```bash
wget https://github.com/EvilBit-Labs/opnDossier/releases/download/{{.Tag}}/opndossier_{{.Version}}_amd64.deb
sudo dpkg -i opndossier_{{.Version}}_amd64.deb
```
**Red Hat/CentOS/Fedora (.rpm)**:
```bash
wget https://github.com/EvilBit-Labs/opnDossier/releases/download/{{.Tag}}/opndossier-{{.Version}}-1.x86_64.rpm
sudo rpm -i opndossier-{{.Version}}-1.x86_64.rpm
```
**Alpine (.apk)**:
```bash
wget https://github.com/EvilBit-Labs/opnDossier/releases/download/{{.Tag}}/opndossier_{{.Version}}_x86_64.apk
sudo apk add --allow-untrusted opndossier_{{.Version}}_x86_64.apk
```
**Arch Linux**:
```bash
wget https://github.com/EvilBit-Labs/opnDossier/releases/download/{{.Tag}}/opndossier-{{.Version}}-1-x86_64.pkg.tar.zst
sudo pacman -U opndossier-{{.Version}}-1-x86_64.pkg.tar.zst
```
> **Note:** For pre-release versions (e.g., `1.4.0-rc.1`), package filenames
> use format-specific version transforms (`~` for deb/rpm, `_` for apk,
> concatenated for archlinux). Check the release assets list for exact filenames.
### Download Binary
Download the appropriate binary for your platform from the assets below.
### Verify Checksums
```bash
sha256sum -c opnDossier_checksums.txt
```
# Source tarball (disabled - use git clone instead)
source:
enabled: false
# Universal binaries for macOS (combines amd64 and arm64)
# With replace: true, the individual darwin/amd64 and darwin/arm64 binaries are
# removed from artifacts and replaced by a single darwin/all universal binary.
# The archive name_template produces "Darwin_all" for the Arch variable.
universal_binaries:
- id: opndossier-universal
ids:
- opndossier
replace: true
hooks:
post:
# macOS code signing with quill (optional, requires Apple credentials)
# Set QUILL_SIGN_P12, QUILL_SIGN_PASSWORD, QUILL_NOTARY_KEY, QUILL_NOTARY_KEY_ID, QUILL_NOTARY_ISSUER
# For snapshots: ad-hoc signing only (no notarization)
# For releases: full signing and notarization
# Runs on the universal binary (not individual arch binaries) so the
# signed artifact is what ships in the release tarball.
- cmd: >-
{{ if isEnvSet "QUILL_SIGN_P12" }}
quill sign-and-notarize "{{ .Path }}" --dry-run={{ .IsSnapshot }} --ad-hoc={{ .IsSnapshot }} -vv
{{ end }}
env:
- QUILL_LOG_FILE=/tmp/quill-universal.log
output: true
# Milestone auto-close
milestones:
- repo:
owner: "EvilBit-Labs"
name: opnDossier
close: true
fail_on_error: false
# Homebrew cask
# https://goreleaser.com/customization/homebrew_casks/
homebrew_casks:
- name: opndossier
repository:
owner: EvilBit-Labs
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
directory: Casks
homepage: https://github.com/EvilBit-Labs/opnDossier
description: "OPNsense configuration documentation and compliance auditing tool"
binaries:
- opndossier
manpages:
- man/opndossier.1
completions:
bash: completions/opndossier.bash
zsh: completions/opndossier.zsh
fish: completions/opndossier.fish
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
commit_msg_template: "Cask update for {{ .ProjectName }} version {{ .Tag }}"
# Linux packages (deb, rpm, apk, archlinux)
# https://goreleaser.com/customization/nfpm/
nfpms:
- id: packages
package_name: opndossier
file_name_template: "{{ .ConventionalFileName }}"
vendor: EvilBit Labs
homepage: https://github.com/EvilBit-Labs/opnDossier
maintainer: EvilBit Labs <support@evilbitlabs.io>
description: |
opnDossier is a command-line interface (CLI) tool designed to process OPNsense firewall configuration files (config.xml) and convert them into human-readable formats, primarily Markdown. This tool assists network administrators and security professionals in documenting, auditing, and understanding their OPNsense configurations more effectively.
license: Apache-2.0
section: utils
priority: optional
formats:
- deb
- rpm
- apk
- archlinux
dependencies:
- ca-certificates
recommends:
- git
- curl
suggests:
- bash-completion
bindir: /usr/bin
contents:
# Documentation
- src: ./LICENSE
dst: /usr/share/doc/opndossier/LICENSE
file_info:
mode: 0644
- src: ./README.md
dst: /usr/share/doc/opndossier/README.md
file_info:
mode: 0644
- src: ./CHANGELOG.md
dst: /usr/share/doc/opndossier/CHANGELOG.md
file_info:
mode: 0644
- src: ./THIRD_PARTY_NOTICES
dst: /usr/share/doc/opndossier/THIRD_PARTY_NOTICES
file_info:
mode: 0644
# Man page
- src: ./packaging/opndossier.1
dst: /usr/share/man/man1/opndossier.1
file_info:
mode: 0644
# Shell completions
- src: ./packaging/completions/opndossier.bash
dst: /usr/share/bash-completion/completions/opndossier
file_info:
mode: 0644
- src: ./packaging/completions/opndossier.zsh
dst: /usr/share/zsh/site-functions/_opndossier
file_info:
mode: 0644
- src: ./packaging/completions/opndossier.fish
dst: /usr/share/fish/vendor_completions.d/opndossier.fish
file_info:
mode: 0644
rpm:
group: Applications/System
compression: lzma
signature:
key_file: '{{ if index .Env "RPM_SIGNING_KEY_FILE" }}{{ .Env.RPM_SIGNING_KEY_FILE }}{{ end }}'
deb:
compression: xz
signature:
key_file: '{{ if index .Env "DEB_SIGNING_KEY_FILE" }}{{ .Env.DEB_SIGNING_KEY_FILE }}{{ end }}'
apk:
signature:
key_file: '{{ if index .Env "APK_SIGNING_KEY_FILE" }}{{ .Env.APK_SIGNING_KEY_FILE }}{{ end }}'
archlinux:
pkgbase: opndossier
packager: EvilBit Labs <support@evilbitlabs.io>
winget:
- name: opndossier
publisher: EvilBit Labs
short_description: OPNsense configuration documentation and compliance auditing tool
description: |
opnDossier is a command-line interface (CLI) tool designed to process OPNsense firewall configuration files (config.xml) and convert them into human-readable formats, primarily Markdown. This tool assists network administrators and security professionals in documenting, auditing, and understanding their OPNsense configurations more effectively.
license: Apache-2.0
homepage: https://github.com/EvilBit-Labs/opnDossier
publisher_url: "https://evilbitlabs.io/opnDossier"
publisher_support_url: "https://github.com/EvilBit-Labs/opnDossier/issues/new"
privacy_url: "https://evilbitlabs.io/privacy"
tags:
- opnsense
- firewall
- audit
- compliance
- cli
- security
# Manifests are generated but not pushed until the fork exists.
# To enable: fork microsoft/winget-pkgs to EvilBit-Labs/winget-pkgs,
# then change skip_upload to 'auto' (skips prereleases only).
skip_upload: true
repository:
owner: EvilBit-Labs
name: winget-pkgs
branch: "{{.ProjectName}}-{{.Version}}"
pull_request:
enabled: true
base:
owner: microsoft
name: winget-pkgs
branch: master
# Docker image configuration (v2 - native multi-platform)
# https://goreleaser.com/customization/package/dockers_v2
dockers_v2:
# Versioned tag — always pushed, including pre-releases
- id: ghcr-versioned
images:
- "ghcr.io/evilbit-labs/opndossier"
tags:
- "{{ .Tag }}"
dockerfile: Dockerfile
platforms:
- linux/amd64
- linux/arm64
labels:
org.opencontainers.image.created: "{{.Date}}"
org.opencontainers.image.title: "{{.ProjectName}}"
org.opencontainers.image.revision: "{{.FullCommit}}"
org.opencontainers.image.version: "{{.Version}}"
org.opencontainers.image.source: "https://github.com/EvilBit-Labs/opnDossier"
org.opencontainers.image.licenses: "Apache-2.0"
annotations:
org.opencontainers.image.source: "https://github.com/EvilBit-Labs/opnDossier"
# Floating tags (latest, major) — stable releases only.
# Disabled entirely for prerelease builds to avoid pushing empty tags.
- id: ghcr-stable
disable: "{{ if .Prerelease }}true{{ else }}false{{ end }}"
images:
- "ghcr.io/evilbit-labs/opndossier"
tags:
- "v{{ .Major }}"
- "latest"
dockerfile: Dockerfile
platforms:
- linux/amd64
- linux/arm64
labels:
org.opencontainers.image.created: "{{.Date}}"
org.opencontainers.image.title: "{{.ProjectName}}"
org.opencontainers.image.revision: "{{.FullCommit}}"
org.opencontainers.image.version: "{{.Version}}"
org.opencontainers.image.source: "https://github.com/EvilBit-Labs/opnDossier"
org.opencontainers.image.licenses: "Apache-2.0"
annotations:
org.opencontainers.image.source: "https://github.com/EvilBit-Labs/opnDossier"
# Docker image signing with Cosign (keyless)
# https://goreleaser.com/customization/docker_sign/
docker_signs:
- cmd: cosign
args:
- "sign"
- "--yes"
- "${artifact}"
artifacts: manifests
output: true
# SBOM generation with CycloneDX-gomod
# https://goreleaser.com/customization/sbom/
# https://github.com/CycloneDX/cyclonedx-gomod
sboms:
- id: binary-sbom
documents:
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.bom.json"
artifacts: binary
cmd: cyclonedx-gomod
args: ["bin", "-json", "-output", "$document", "$artifact"]
- id: module-sbom
documents:
- "{{ .ProjectName }}_{{ .Version }}_module.bom.json"
artifacts: any
cmd: cyclonedx-gomod
args: ["mod", "-licenses", "-std", "-json", "-output", "$document", "../"]
# Artifact signing configuration
# https://goreleaser.com/customization/sign/
signs:
# Cosign v3 keyless signing for checksums (Sigstore transparency log)
# https://goreleaser.com/blog/cosign-v3/
- id: checksum-cosign
cmd: cosign
signature: "${artifact}.sigstore.json"
args:
- "sign-blob"
- "--bundle=${signature}"
- "${artifact}"
- "--yes"
artifacts: checksum
output: true
# GPG signing disabled for now - re-enable when secrets are properly configured
# See RELEASING.md for GPG setup instructions