Skip to content

Commit

Permalink
chore(ci): prepare release.
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Normand <me@zenithar.org>
  • Loading branch information
Zenithar committed Jul 20, 2022
1 parent 89ea196 commit 2642a7a
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 426 deletions.
48 changes: 11 additions & 37 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,41 +87,26 @@ jobs:
AC_PASSWORD: "${{ secrets.AC_PASSWORD }}"
run: |
echo '{
"source": ["./dist/harp-darwin-amd64"],
"bundle_id":"co.elastic.harp",
"source": [
"./dist/harp-darwin-amd64",
"./dist/harp-darwin-arm64"
],
"bundle_id":"io.harpsec.cli",
"apple_id": {},
"sign": { "application_identity": "9470D0A7B70090A8EF31C3B33AB3868B38B27A3D" },
"zip": {
"output_path": "./dist/harp-darwin-amd64.zip"
"output_path": "./dist/harp-darwin.zip"
}
}' | jq '' > gon.amd64.json
gon -log-level=debug -log-json ./gon.amd64.json
rm -f .dist/harp-darwin-amd64
-
name: Sign and notarize MacOS ARM64 cli
env:
AC_USERNAME: "${{ secrets.AC_USERNAME }}"
AC_PASSWORD: "${{ secrets.AC_PASSWORD }}"
run: |
echo '{
"source": ["./dist/harp-darwin-arm64"],
"bundle_id":"co.elastic.harp",
"apple_id": {},
"sign": { "application_identity": "9470D0A7B70090A8EF31C3B33AB3868B38B27A3D" },
"zip": {
"output_path": "./dist/harp-darwin-arm64.zip"
}
}' | jq '' > gon.arm64.json
gon -log-level=debug -log-json ./gon.arm64.json
rm -f .dist/harp-darwin-arm64
}' | jq '' > gon.json
gon -log-level=debug -log-json ./gon.json
rm -f .dist/harp-darwin-*
-
name: Prepare archives
run: |
#!/bin/bash
shopt -s expand_aliases
cd .dist/
unzip ../dist/harp-darwin-amd64.zip
unzip ../dist/harp-darwin-arm64.zip
unzip ../dist/harp-darwin.zip
FILES="*"
for f in $FILES;
do
Expand All @@ -136,17 +121,6 @@ jobs:
;;
esac
done
# Disable provenance
#
#-
# name: Generate provenance for Release
# uses: philips-labs/slsa-provenance-action@v0.7.2
# with:
# command: generate
# subcommand: files
# arguments: --artifact-path .dist --output-path '.dist/provenance.json'
# env:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
-
name: Sign
shell: bash
Expand Down Expand Up @@ -177,7 +151,7 @@ jobs:
run: |
#!/bin/bash
shopt -s expand_aliases
curl -sLO https://raw.githubusercontent.com/elastic/harp/v${{ github.event.inputs.release }}/build/artifact/cosign.pub
curl -sLO https://raw.githubusercontent.com/zntrio/harp/v${{ github.event.inputs.release }}/build/artifact/cosign.pub
cd .dist
FILES="*"
for f in $FILES;
Expand Down
44 changes: 11 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
## 0.3.0
## 0.3.1

### NOT RELEASED YET

## 0.3.0

### 2022-07-20

DIST:

* First version from `zntrio` fork

* sdk/tools:
* github.com/daixiang0/gci v0.3.3
* github.com/golangci/golangci-lint v1.46.2
* github.com/daixiang0/gci v0.4.3
* github.com/elastic/go-licenser v0.4.1
* github.com/golangci/golangci-lint v1.47.1
* github.com/magefile/mage v1.13.0
* google.golang.org/protobuf v1.28.0
* gotest.tools/gotestsum v1.8.1
* mvdan.cc/gofumpt v0.3.1

* sdk/dep:
* github.com/cloudflare/tableflip v1.2.3
* github.com/davecgh/go-spew v1.1.1
* github.com/google/cel-go v0.11.4
* github.com/google/go-cmp v0.5.8
* github.com/google/gops v0.3.23
* github.com/hashicorp/hcl/v2 v2.12.0
* github.com/hashicorp/vault/api v1.5.0
* github.com/klauspost/compress v1.15.4
* github.com/open-policy-agent/opa v0.40.0
* github.com/pelletier/go-toml v1.9.5
* github.com/pierrec/lz4 v2.6.1+incompatible
* github.com/sebdah/goldie v1.0.0
* github.com/sethvargo/go-diceware v0.3.0
* github.com/spf13/viper v1.11.0
* github.com/xeipuuv/gojsonschema v1.2.0
* go.etcd.io/etcd/client/v3 v3.5.4
* go.step.sm/crypto v0.16.1
* golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167
* golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
* golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
* golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a
* golang.org/x/term v0.0.0-20220411215600-e5f449aeb171
* google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3
* google.golang.org/grpc v1.46.2
* google.golang.org/protobuf v1.28.0
* gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99
* oras.land/oras-go v1.1.1

* CI:
* Build with Golang 1.18.2
* Build with Golang 1.18.4

## 0.2.10

Expand Down
4 changes: 2 additions & 2 deletions build/artifact/cosign.pub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEVAGQjWzRHqYorgcx1Up03mEkWKGO
LE6nLEeXefUP0iMC1eeh4szWYpll8Y9g9KK4LagfGKN1zGE/H5Sln+q1gQ==
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7gwXvV/yT33dKJ+71O/3k5DMjizR
tdA+C26vIc4SWs4wbSw6Qv+QlC3AwibnSmIGVQuRGKr68tjmZaPHpmGxOg==
-----END PUBLIC KEY-----
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require github.com/gogo/protobuf v1.3.2 // indirect
require (
github.com/containerd/containerd v1.6.6 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799
github.com/opencontainers/runc v1.1.2 // indirect
github.com/opencontainers/runc v1.1.3 // indirect
)

require (
Expand Down Expand Up @@ -80,11 +80,11 @@ require (
go.etcd.io/etcd/client/v3 v3.5.4
go.step.sm/crypto v0.17.0
go.uber.org/zap v1.21.0
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
google.golang.org/grpc v1.48.0
google.golang.org/protobuf v1.28.0
gopkg.in/square/go-jose.v2 v2.6.0
Expand Down Expand Up @@ -187,7 +187,7 @@ require (
go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
golang.org/x/text v0.3.8-0.20211004125949-5bd84dd9b33b // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
22 changes: 13 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,9 @@ github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec=
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0=
github.com/opencontainers/runc v1.1.2 h1:2VSZwLx5k/BfsBxMMipG/LYUnmqOD/BPkIVgQUcTlLw=
github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc=
github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w=
github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg=
github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
Expand Down Expand Up @@ -882,6 +883,7 @@ github.com/sebdah/goldie v1.0.0 h1:9GNhIat69MSlz/ndaBg48vl9dF5fI+NBB6kfOxgfkMc=
github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4=
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sethvargo/go-diceware v0.3.0 h1:UVVEfmN/uF50JfWAN7nbY6CiAlp5xeSx+5U0lWKkMCQ=
Expand Down Expand Up @@ -1106,8 +1108,9 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
Expand Down Expand Up @@ -1199,8 +1202,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8=
golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ=
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand All @@ -1213,8 +1216,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g=
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE=
golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92 h1:oVlhw3Oe+1reYsE2Nqu19PDJfLzwdU3QUUrG86rLK68=
golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -1323,14 +1326,15 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d h1:Zu/JngovGLVi6t2J3nmAf3AoTDwuzw85YZ3b9o4yU7s=
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
5 changes: 5 additions & 0 deletions pkg/sdk/platform/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ func Serve(ctx context.Context, srv *Server) error {

server := &http.Server{
Handler: instrumentationRouter,
// Set timeouts to avoid Slowloris attacks.
ReadHeaderTimeout: time.Second * 20,
WriteTimeout: time.Second * 60,
ReadTimeout: time.Second * 60,
IdleTimeout: time.Second * 120,
}

group.Add(
Expand Down
1 change: 1 addition & 0 deletions pkg/sdk/value/encryption/dae/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func decodeKey(key string) (k, salt []byte, err error) {
return k, salt, err
}

//nolint:unparam // info is always nil
func deriveKey(secret, salt, info []byte, dkLen int) ([]byte, error) {
// Prepare HKDF-SHA256
reader := hkdf.New(sha256.New, secret, salt, info)
Expand Down
Loading

0 comments on commit 2642a7a

Please sign in to comment.