Граф коммитов

1397 Коммитов

Автор SHA1 Сообщение Дата
Hidde Beydals cb2bbe3c1b
chore: update dependencies
- google.golang.org/api to v0.141.0
- google.golang.org/genproto/googleapis/rpc to v0.0.0-20230913181813-007df8e322eb
- google.golang.org/grpc to v1.58.1

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-14 23:43:34 +02:00
Hidde Beydals 9f80940ac9
Merge pull request #1281 from getsops/log-regression 2023-09-13 07:55:29 +02:00
Hidde Beydals 6ec0312ffe
keyservices: address logging regression
Replace the logging of failed encryption and decryption attempts from
error to info level.

This to address a regression in which an encryption or decryption
attempt with a series of keys would result in a list of failed attempts
logged to stderr even when the operation itself eventually succeeded.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-13 07:44:08 +02:00
Hidde Beydals cb678769b0
Merge pull request #1282 from getsops/pgp-remove-opt
pgp: remove `DisableAgent` option
2023-09-13 07:43:51 +02:00
Hidde Beydals 0fb45f185a
pgp: remove `DisableAgent` option
This option actually gives a false impression, as disabling the agent is
no longer possible since GnuPG 2.x.

```
--use-agent --no-use-agent This is dummy option. gpg always requires the agent.
```

xref: https://www.gnupg.org/documentation/manuals/gnupg24/gpg.1.html

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-13 00:04:30 +02:00
Hidde Beydals f94a564590
Merge pull request #1278 from getsops/rename-provenance-file
release: generate versioned `.intoto.jsonl`
2023-09-12 09:43:53 +02:00
Hidde Beydals ef7ee635b8
build: fix indentation Dependabot file
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-12 09:20:26 +02:00
Hidde Beydals 9e67a3c37d
release: generate versioned `.intoto.jsonl`
This ensures the file name is unique per release, and can be linked by
file name to the specific SOPS version it is targeted at.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-12 09:19:53 +02:00
Hidde Beydals 14c6b8faeb
Merge pull request #1279 from getsops/dependabot/github_actions/ci-19dd85564c 2023-09-12 08:42:27 +02:00
dependabot[bot] 3893a91820
build(deps): Bump the ci group with 6 updates
Bumps the ci group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/setup-go](https://github.com/actions/setup-go) | `3.5.0` | `4.1.0` |
| [actions/checkout](https://github.com/actions/checkout) | `3.5.3` | `4.0.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.1.1` | `3.1.2` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `2.9.1` | `2.10.0` |
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `4.3.0` | `5.0.0` |
| [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) | `1.8.0` | `1.9.0` |


Updates `actions/setup-go` from 3.5.0 to 4.1.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3.5.0...93397bea11091df50f3d7e59dc26a7711a8bcfbe)

Updates `actions/checkout` from 3.5.3 to 4.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.3...3df4ab11eba7bda6032a0b82a6bb43b11571feac)

Updates `sigstore/cosign-installer` from 3.1.1 to 3.1.2
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](6e04d228eb...11086d2504)

Updates `docker/setup-buildx-action` from 2.9.1 to 2.10.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](4c0219f9ac...885d1462b8)

Updates `goreleaser/goreleaser-action` from 4.3.0 to 5.0.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](336e29918d...7ec5c2b0c6)

Updates `slsa-framework/slsa-github-generator` from 1.8.0 to 1.9.0
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 06:37:37 +00:00
Hidde Beydals db3dc5c045
Merge pull request #1280 from getsops/dependabot/go_modules/go-cf07ee1e65 2023-09-12 08:35:52 +02:00
dependabot[bot] 7e0b4fbc5b
build(deps): Bump the go group with 2 updates
Bumps the go group with 2 updates: [cloud.google.com/go/kms](https://github.com/googleapis/google-cloud-go) and [google.golang.org/api](https://github.com/googleapis/google-api-go-client).


Updates `cloud.google.com/go/kms` from 1.15.1 to 1.15.2
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/kms/v1.15.1...kms/v1.15.2)

Updates `google.golang.org/api` from 0.139.0 to 0.140.0
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.139.0...v0.140.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/kms
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 06:12:24 +00:00
Hidde Beydals 837beb4526
Merge pull request #1277 from getsops/enable-dependabot 2023-09-12 08:10:39 +02:00
Hidde Beydals 0dff2ecea6
Enable Dependabot for Docker, GH Actions and Go
This enables Dependabot using three groups, one for container images,
one for GitHub Actions, and one for Go Modules.

In the future, we may want to split the Go Modules into multiple
groups. For example, one for each key source with a misc catch-all
group for any other dependency.

xref: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/customizing-dependency-updates#grouping-dependabot-version-updates-into-one-pull-request

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-12 07:59:09 +02:00
Hidde Beydals a60045a0a1
Merge pull request #1276 from getsops/gh-action-workflow-imprv 2023-09-12 07:27:06 +02:00
Hidde Beydals d98a7f2adc
build: add CodeQL workflow
This enables CodeQL scanning to automatically catch certain common
security and quality issues in the GitHub UI.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-12 00:00:43 +02:00
Hidde Beydals 6506bbbba8
build: pin actions to full length commit SHA
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-11 23:14:52 +02:00
Hidde Beydals cd3abd1f8f
Merge pull request #1275 from getsops/update-deps
chore: update dependencies
2023-09-11 23:14:44 +02:00
Hidde Beydals cb9287162c
chore: update dependencies
- cloud.google.com/go/storage to v1.33.0
- github.com/Azure/azure-sdk-for-go/sdk/azcore to v1.7.2
- github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys to v1.0.1
- github.com/ProtonMail/go-crypto to v0.0.0-20230828082145-3c4c8a2d2371
- github.com/aws/aws-sdk-go-v2/config to v1.18.39
- github.com/aws/aws-sdk-go-v2/credentials to v1.13.37
- github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.11.83
- github.com/hashicorp/vault/api to v1.10.0
- golang.org/x/net to v0.15.0
- golang.org/x/sys to v0.12.0
- golang.org/x/term to v0.12.0
- google.golang.org/api to v0.139.0
- google.golang.org/genproto/googleapis/rpc to v0.0.0-20230911183012-2d3300fd4832
- google.golang.org/grpc to v1.58.0

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-11 22:42:29 +02:00
Hidde Beydals 7b3a032ade
Merge pull request #1268 from getsops/prep-v3.8.0-rc.1
Prepare v3.8.0-rc.1
2023-08-25 13:00:53 +02:00
Hidde Beydals 54500a0ad2
Prepare v3.8.0-rc.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 12:40:30 +02:00
Hidde Beydals b0af0a9a85
Merge pull request #1269 from felixfontein/rst
Fix CHANGELOG.rst formatting
2023-08-25 12:36:35 +02:00
Felix Fontein a958b65346 Fix formatting
Change MarkDown-style formatting to proper RST formatting.

Signed-off-by: Felix Fontein <felix@fontein.de>
2023-08-25 12:28:24 +02:00
Hidde Beydals a134c36e5a
Merge pull request #1267 from getsops/tweak-cli-workflow
build: ensure clean working tree
2023-08-24 19:50:24 +02:00
Hidde Beydals 58735d3ca1
build: remove obsolete step & improve readability
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-24 13:49:54 +02:00
Hidde Beydals 0cd0984ceb
build: address out-of-sync `go.mod`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-24 13:47:42 +02:00
Hidde Beydals 8b04e4c001
build: ensure clean working tree
This catches `go.*` files being out-of-sync.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-24 13:45:32 +02:00
Hidde Beydals be21fa9050
Merge pull request #1265 from getsops/close-editor-file 2023-08-24 09:21:40 +02:00
Hidde Beydals 7b74dea9fc
cmd/edit: switch from MD5 to SHA-256 for checksum
More 2023 alike :-)

This change is fully backwards compatible, as the checksum is only used
to make a comparison before and after the file has been opened by the
editor.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-24 08:59:49 +02:00
Hidde Beydals cef31343f3
cmd/edit: close temp file before invoking editor
This changes the logic of the edit target to close the temporary file
before it is opened by the user their editor. This works around an
issue on Windows where editors are unable to open the file because the
Go standard library opens file handles with only shared read and write
access (excluding deletion access, which is required by some).

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-24 08:59:43 +02:00
Hidde Beydals dbe911673c
Merge pull request #1262 from getsops/tidy-deprecations 2023-08-24 08:00:31 +02:00
Hidde Beydals 92aa55f06a
*: `strings.Title` deprecation
Replace with simple manual construction of upper boolean
representation, as the (construction of the) `golang.org/x/text/cases`
replacement is way too complex for this use case.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 23:30:35 +02:00
Hidde Beydals 7e487fa0d2
kms: use `BaseEndpoint` for testing
This does the same, but with much less boilerplate.

xref: https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/endpoints/#v2-endpointresolverv2--baseendpoint

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 13:42:49 +02:00
Hidde Beydals faa0e29136
*: deal with various gRPC deprecations
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 13:42:49 +02:00
Hidde Beydals 2b7b02351b
gcpkms: further deal with Google SDK deprecations
xref: e535dc7c1d/migration.md

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 13:42:49 +02:00
Hidde Beydals 0db842d09b
Merge pull request #1261 from getsops/version-cmd-gh-api
version: rewrite command to use GitHub endpoints
2023-08-23 13:36:51 +02:00
Hidde Beydals e26844deff
version: rewrite command to use GitHub endpoints
This changes the logic of parsing the `version.go` file from a certain
branch to instead make use of the GitHub latest release redirect or
API[1] endpoints for checking if `sops` is on the latest version.

Detaching any future release of SOPS from specific file structures
and/or branches, and (theoretically) freeing it from the requirement of
having to bump the version in-code during release (as this is also done
using `-ldflags` during build). Were it not for the fact that we have
to maintain it for backwards compatibility.

[1]: https://docs.github.com/en/free-pro-team@latest/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 07:37:42 +02:00
Hidde Beydals f52bd8d19d
release: properly enquote version ldflag
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 07:37:07 +02:00
Hidde Beydals 35039c363a
Merge pull request #1264 from getsops/update-deps 2023-08-23 06:51:41 +02:00
Hidde Beydals d2cb16ec7c
Update dependencies
- cloud.google.com/go/storage to v1.32.0
- github.com/Azure/azure-sdk-for-go/sdk/azcore to v1.7.1
- github.com/Azure/azure-sdk-for-go/sdk/azidentity to v1.3.1
- github.com/ProtonMail/go-crypto to v0.0.0-20230717121422-5aa5874ade95
- github.com/aws/aws-sdk-go-v2 to v1.21.0
- github.com/aws/aws-sdk-go-v2/config to v1.18.36
- github.com/aws/aws-sdk-go-v2/credentials to v1.13.35
- github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.11.80
- github.com/aws/aws-sdk-go-v2/service/kms to v1.24.5
- github.com/aws/aws-sdk-go-v2/service/s3 to v1.38.5
- github.com/aws/aws-sdk-go-v2/service/sts to v1.21.5
- google.golang.org/api to v0.138.0
- google.golang.org/genproto to v0.0.0-20230822172742-b8732ec3820d
- google.golang.org/genproto/googleapis/rpc to v0.0.0-20230822172742-b8732ec3820d

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-22 21:34:04 +02:00
Hidde Beydals 35b673e35e
Merge pull request #1258 from getsops/imprv-make-targets
Improve Make targets and address various issues
2023-08-22 21:13:44 +02:00
Hidde Beydals fe346f90d8
build: add `clean` and delete `tag`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:33:10 +02:00
Hidde Beydals 00d48fa31c
build: ensure Syft is installed
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:23:41 +02:00
Hidde Beydals a1f1bc0388
build: ignore `functional-tests/sops`
This should just really not be put there, but lets be nice and ignore it
for now.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:16:43 +02:00
Hidde Beydals 4dbc212507
build: remove `test.sh` wrapper
My assumption is that this used to be in place because of `go` not
ignoring the `vendor` directory.

However, in 2023 this appears to no longer be an issue, and only
adds complexity. While running `go test ./...` works just fine.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:16:42 +02:00
Hidde Beydals eeaf9f76d5
*: address various simple `staticcheck` warnings
Deprecation of `io/ioutil`, removal of unused functions, possible nil
pointer dereference, and other tiny nits.

There are (many) more, but these would require their own (commit)
context.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:16:40 +02:00
Hidde Beydals f85eb011a6
build: replace `golint` with `staticcheck`
As it has been deprecated for about ~2 years in favor of `go vet` and
tools like `staticcheck`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:14:21 +02:00
Hidde Beydals ca0e15eda3
*: solve `go vet` errors
```
stores/dotenv/store.go:74:12: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/dotenv/store_test.go:29:10: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
keyservice/server.go:149:9: assignment copies lock value to key: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:206:20: call of ks.prompt copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:214:22: keyToString passes lock by value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:231:29: prompt passes lock by value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:232:27: call of keyToString copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:251:9: assignment copies lock value to key: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:308:20: call of ks.prompt copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
stores/yaml/store_test.go:27:11: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:39:11: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:107:5: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:139:13: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
decrypt/example_test.go:34:1: ExampleDecryptFile refers to unknown identifier: DecryptFile
```

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:14:20 +02:00
Hidde Beydals 6705088a33
build: actually run `go vet` for whole project
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:14:20 +02:00
Hidde Beydals c79cbfd2cc
Merge pull request #1260 from Gobd/mozcleanup
Clean up more Mozilla references
2023-08-16 22:44:18 +02:00