Skip to content

Commit

Permalink
Add the signing verification instructions (#849)
Browse files Browse the repository at this point in the history
Removing the empty link from dig007
  • Loading branch information
owenrumney authored Jul 12, 2021
1 parent 715c2d4 commit aeaf3b8
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 3 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ You can also grab the binary for your system from the [releases page](https://gi
Alternatively, install with Go:

```bash
go get -u github.com/tfsec/tfsec/cmd/tfsec
go install github.com/tfsec/tfsec/cmd/tfsec@latest
```

Please note that using `go get` will install directly from the `master` branch and version numbers will not be reported via `tfsec --version`.
Please note that using `go install` will install directly from the `master` branch and version numbers will not be reported via `tfsec --version`.

### Signing

The binaries on the [releases page](https://github.com/tfsec/tfsec/releases) are signed with the tfsec signing key `D66B222A3EA4C25D5D1A097FC34ACEFB46EC39CE`

Form more information check the [signing page](SIGNING.md) for instructions on verification.

## Usage

Expand Down
95 changes: 95 additions & 0 deletions SIGNING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Signing

All tfsec binaries are signed with out signing key `D66B222A3EA4C25D5D1A097FC34ACEFB46EC39CE`. The steps below detail how to verify the signature of the keys.


## Public Key

```
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGCmSy4BEAC9IxH3DeV+xeORRypRZe28YYSvDvBZdfer0apm+p1kJFsXM6ns
dng9PThUihEt11BMtLmlQyPMQ0TsONOjqFaqNEitzNe55MSHxTYkTrnctrF3IKS4
G35RHcHUctx9j4Cg56eRxU1cb0B/JJdh9HjZtQG9CJB0+WU/UlXOgYn/17ZScS6Q
tq56SKd+lW5BfTzl+aYdzbrlWh1Ukla7DvydQmxY7XHgfKbLrGJVQdL91opJvXKr
D1vxDuMpZHSm9lp6G5GXsZIA080QKcD3nSjeeRTxuABDwHD/1OS03iZQtxwjUMRw
FYFlrcSVap20SXMLAtKRDpWGhAyzI+JUhZQMuRj22jcicEs7CKGXteFMFlgh3R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xcDb7m
Li41jwmfqHdkC0c6LI9QstOcyV2n5u2/HX0tJLGw47w5eEsfhcI5xgw/adBjqpHM
lEKTJcyJuIY++9PiNmG5algPwAa+0XrgCdLHyHXHHhoFV+5xj29iWpfPlqLLl1eT
QqnbqpcOupcsFsASiM5zVGZHK6LYuDkk9Ey/TrqcAhxfyl8cXNpdRC7PanHtykvC
DKa/6fXNJ3MtpQZ+Z+JjoN1PWQP3UqDYhXxizzT6TrT5N72M//bLm0hadPCt+8Wx
CzlBBxuxlGEhdriYFUtQ/wN7cRR659qZARylfXI5j1mHBlPuIEoSCMkkz/Nj3Bxo
iuzLVVrX0h16N7H2wclTsw2LDf2rPlTIcI5Ct41fOSyyagZhWoR05JbaY4+yfhjx
FkM0ly4XGasTbjJpwbJKWtXwiLXNaCCzQJH1DBdh5O3lHIidqcdoi+iAcpgaJCXI
p297ny/7PTHmTaZhdjGcBp2tAmd+J0zgsmNk3qUg5pPGKdUnCA5jjENfmTMP4ets
nX5QmAEwF/nBYV3Du7TIvHtz91yL8A==
=opqY
-----END PGP PUBLIC KEY BLOCK-----
```

## Verifying Binary

### Import Key

1. Copy the public key block into a new file, eg; /tmp/tfsec_key.txt

2. Import the gpg key
```
gpg --import < /tmp/tfsec_key.txt
```
3. Verify that the key has been imported
```
gpg --list-keys [email protected]
```
check the output is
```
pub rsa4096 2021-05-20 [SC] D66B222A3EA4C25D5D1A097FC34ACEFB46EC39CE
uid [ultimate] Tfsec Signing (Code signing for tfsec) <[email protected]>
sub rsa4096 2021-05-20 [E]
```
4. Download the required binary and its associated sig file
5. Assuming it is `tfsec-linux-amd64` the verify command below should be run, passing in the sig file then the binary file
```
gpg --verify tfsec-linux-amd64.D66B222A3EA4C25D5D1A097FC34ACEFB46EC39CE.sig tfsec-linux-amd64
```
This should give you a similar output to that below - the key part is that it is signed and has a `Good signature`
```
gpg: Signature made Fri 09 Jul 2021 11:41:22 BST
gpg: using RSA key D66B222A3EA4C25D5D1A097FC34ACEFB46EC39CE
gpg: Good signature from "Tfsec Signing (Code signing for tfsec) <[email protected]>" [ultimate]

```
1 change: 0 additions & 1 deletion internal/app/tfsec/rules/dig007.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func init() {
GoodExample: DIGForceDestroyEnabledGoodExample,
Links: []string{
"https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/spaces_bucket#force_destroy",
"",
},
},
Provider: provider.DigitalOceanProvider,
Expand Down

0 comments on commit aeaf3b8

Please sign in to comment.