Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename import package to reflect future org change to cnabio #42

Merged
merged 3 commits into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ jobs:

- name: Build, Test, Lint
run: |
export GOPATH=$HOME/go
export GOBIN=$(go env GOPATH)/bin
export PATH=$PATH:$GOPATH
export PATH=$PATH:$GOBIN
mkdir -p $GOPATH/pkg
mkdir -p $GOBIN
mkdir -p $GOPATH/src/github.com/$GITHUB_REPOSITORY
mv $(pwd)/* $GOPATH/src/github.com/$GITHUB_REPOSITORY
cd $GOPATH/src/github.com/$GITHUB_REPOSITORY
export GOPATH=$HOME/go && export GOBIN=$(go env GOPATH)/bin && export PATH=$PATH:$GOPATH&& export PATH=$PATH:$GOBIN && mkdir -p $GOBIN
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we might want to tweak the Makefile to not need a GOPATH anymore, I'll open a separate issue about it.


GO111MODULE=on make bootstrap build test lint
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Engineerd
Copyright (c) 2019 The CNAB Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT := signy
ORG := engineerd
ORG := cnabio
BINDIR := $(CURDIR)/bin
GOFLAGS :=
GOBUILDTAGS := osusergo
Expand Down Expand Up @@ -31,7 +31,6 @@ test:
lint:
golangci-lint run --config ./golangci.yml

HAS_DEP := $(shell $(CHECK) dep)
HAS_GOLANGCI := $(shell $(CHECK) golangci-lint)
HAS_GOIMPORTS := $(shell $(CHECK) goimports)
GOLANGCI_VERSION := v1.16.0
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Signy

![](https://github.com/engineerd/signy/workflows/GitHub%20Actions/badge.svg) [![Build Status](https://dev.azure.com/engineerd-dev/signy/_apis/build/status/engineerd.signy?branchName=master)](https://dev.azure.com/engineerd-dev/signy/_build/latest?definitionId=5&branchName=master)

Signy is a tool for exercising the TUF and in-toto specifications in order to sign various cloud-native artifacts. It uses the Notary client libraries, and communicates with a Notary server.
It is an educational project with the purpose of implementing [the entire TUF workflow for signing content](https://github.com/theupdateframework/specification/blob/master/tuf-spec.md#5-detailed-workflows), and validate its correctness for [Cloud Native Application Bundles (CNAB)](https://github.com/deislabs/cnab-spec), and it is intended as a WIP reference implementation for its security specification.

It implements signing and verifying for CNAB bundles in [the canonical formats (thin and thick bundles)](https://github.com/deislabs/cnab-spec/blob/master/104-bundle-formats.md).
Signy is an experimental tool that implements the CNAB Security specification. It implements signing and verifying for CNAB bundles in [the canonical formats (thin and thick bundles)](https://github.com/deislabs/cnab-spec/blob/master/104-bundle-formats.md).

## Notes

Expand All @@ -19,9 +14,9 @@ It implements signing and verifying for CNAB bundles in [the canonical formats (

```bash
$ cd $GOPATH/src/github.com
$ mkdir engineerd && cd engineerd && git clone https://github.com/engineerd/signy && cd signy
# This will build and install an updated version of the Signy binary in $GOPATH/bin whenever the source changes in $GOPATH/src/github.com/engineerd/signy.
./scripts/live-reload.sh
$ mkdir cnabio && cd cnabio && git clone https://github.com/cnabio/signy && cd signy
$ make bootstrap build
$ mv bin/signy $GOPATH/bin
```

## Using Signy
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/spf13/cobra"

"github.com/engineerd/signy/pkg/tuf"
"github.com/cnabio/signy/pkg/tuf"
)

type listCmd struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"runtime"

"github.com/engineerd/signy/pkg/tuf"
"github.com/cnabio/signy/pkg/tuf"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/engineerd/signy/pkg/cnab"
"github.com/engineerd/signy/pkg/intoto"
"github.com/engineerd/signy/pkg/tuf"
"github.com/cnabio/signy/pkg/cnab"
"github.com/cnabio/signy/pkg/intoto"
"github.com/cnabio/signy/pkg/tuf"
)

type signCmd struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package main
import (
"fmt"

"github.com/engineerd/signy/pkg/trust"
"github.com/cnabio/signy/pkg/trust"

"github.com/spf13/cobra"

"github.com/engineerd/signy/pkg/tuf"
"github.com/cnabio/signy/pkg/tuf"
)

type verifyCmd struct {
Expand Down Expand Up @@ -75,7 +75,7 @@ INFO[0001] The software product passed all verification.
cmd.Flags().StringVarP(&verify.localFile, "local", "", "", "Local file to validate the SHA256 against (mandatory for thick bundles)")

cmd.Flags().BoolVarP(&verify.intoto, "in-toto", "", false, "If passed, will try to fetch in-toto metadata from TUF and perform the verification")
cmd.Flags().StringVarP(&verify.verificationImage, "image", "", "docker.pkg.github.com/engineerd/in-toto-container/verification:v1", "container image to run the in-toto verification")
cmd.Flags().StringVarP(&verify.verificationImage, "image", "", "docker.pkg.github.com/cnabio/in-toto-container/verification:v1", "container image to run the in-toto verification")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also means we must push the verification image to cnabio.

cmd.Flags().BoolVarP(&verify.keepTempDir, "keep", "", false, "if passed, the temporary directory where the in-toto metadata is pulled is not deleted")
cmd.Flags().StringArrayVarP(&verify.targetFiles, "target", "", nil, "target files to copy in container for in-toto verifications")

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/engineerd/signy
module github.com/cnabio/signy

go 1.12

Expand Down
6 changes: 3 additions & 3 deletions pkg/trust/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"encoding/hex"
"fmt"

"github.com/engineerd/signy/pkg/cnab"
"github.com/engineerd/signy/pkg/intoto"
"github.com/engineerd/signy/pkg/tuf"
"github.com/cnabio/signy/pkg/cnab"
"github.com/cnabio/signy/pkg/intoto"
"github.com/cnabio/signy/pkg/tuf"
log "github.com/sirupsen/logrus"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/trust/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

log "github.com/sirupsen/logrus"

"github.com/engineerd/signy/pkg/docker"
"github.com/engineerd/signy/pkg/intoto"
"github.com/engineerd/signy/pkg/tuf"
"github.com/cnabio/signy/pkg/docker"
"github.com/cnabio/signy/pkg/intoto"
"github.com/cnabio/signy/pkg/tuf"
)

// ValidateThinBundle runs the TUF and in-toto validations for a CNAB bundle in thin format (canonical JSON form)
Expand Down
2 changes: 1 addition & 1 deletion pkg/tuf/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/theupdateframework/notary/trustpinning"
"github.com/theupdateframework/notary/tuf/data"

"github.com/engineerd/signy/pkg/cnab"
"github.com/cnabio/signy/pkg/cnab"
)

// SignAndPublish signs an artifact, then publishes the metadata to a trust server
Expand Down
2 changes: 1 addition & 1 deletion pkg/tuf/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/theupdateframework/notary/client"

"github.com/engineerd/signy/pkg/cnab"
"github.com/cnabio/signy/pkg/cnab"
)

// VerifyCNABTrust ensures the trust metadata for a given GUN matches the metadata of the pushed bundle
Expand Down