diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index f56317cb1..1e00c9fed 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,24 +1,20 @@ -## This project is now in maintenance mode. We cannot promise to review contributions. Please feel free to fork the project to apply any changes you might want to make. +# Contributing +## Build +### Requirements +If you wish to work on the driftctl CLI source code, you'll first need to install: +- the Go compiler +- the version control system Git +- [GoReleaser](https://goreleaser.com/) +At this time the `driftctl` development environment is targeting Linux MacOS, and Windows systems. +Refer to the file [`.go-version`](https://github.com/seth-acuitymd/driftctl/blob/master/.go-version) to see which version of Go driftctl is currently built with. Other versions will often work, but if you run into any build or testing problems please try with the specific Go version indicated. You can optionally simplify the installation of multiple specific versions of Go on your system by installing [`goenv`](https://github.com/syndbg/goenv), which reads `.go-version` and automatically selects the correct Go version. - - - - -### Build - -If you wish to work on the driftctl CLI source code, you'll first need to install the Go compiler and the version control system Git. - -At this time the driftctl development environment is targeting only Linux Mac OS X and Windows systems. - -Refer to the file [`.go-version`](https://github.com/cloudskiff/driftctl/blob/master/.go-version) to see which version of Go driftctl is currently built with. Other versions will often work, but if you run into any build or testing problems please try with the specific Go version indicated. You can optionally simplify the installation of multiple specific versions of Go on your system by installing [`goenv`](https://github.com/syndbg/goenv), which reads `.go-version` and automatically selects the correct Go version. - -Use Git to clone this repository into a location of your choice. driftctl is using [Go Modules](https://blog.golang.org/using-go-modules), and so you should *not* clone it inside your `GOPATH`. +Use Git to clone this repository into a location of your choice. `driftctl` is using [Go Modules](https://blog.golang.org/using-go-modules), and so you should *not* clone it inside your `GOPATH`. Switch into the root directory of the cloned repository and build driftctl using GNU Make: @@ -94,10 +90,9 @@ To ensure that the upgrade has worked correctly, be sure to run the unit test su Because dependency changes affect a shared, top-level file, they are more likely than some other change types to become conflicted with other proposed changes during the code review process. For that reason, and to make dependency changes more visible in the change history, we prefer to record dependency changes as separate commits that include only the results of the above commands and the minimal set of changes to driftctl's own code for compatibility with the new version: -``` +```shell script git add go.mod go.sum git commit -m "go get github.com/hashicorp/terraform@13.0.0" ``` You can then make use of the new or updated dependency in code added in subsequent commits. - diff --git a/.goreleaser.yml b/.goreleaser.yml index 3db5bf584..050eb0caf 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +version: 2 project_name: driftctl dist: bin release: @@ -12,7 +14,16 @@ before: signs: - signature: "${artifact}.gpg" artifacts: checksum - args: [ "--batch", "-u", "team-cloud-config+security@snyk.io", "--output", "${signature}", "--detach-sign", "${artifact}" ] + args: + [ + "--batch", + "-u", + "team-cloud-config+security@snyk.io", + "--output", + "${signature}", + "--detach-sign", + "${artifact}", + ] builds: - id: "driftctl" binary: driftctl @@ -27,18 +38,18 @@ builds: - amd64 - arm - arm64 - - 386 + - "386" ldflags: "-s -w -X github.com/snyk/driftctl/build.env={{ .Env.ENV }} -X github.com/snyk/driftctl/pkg/version.version={{ .Tag }}" archives: - name_template: '{{ .ProjectName }}_{{ .Os }}_{{- if eq .Arch "armv6" }}arm{{- else }}{{ .Arch }}{{ end }}' format: binary checksum: - name_template: '{{ .ProjectName }}_SHA256SUMS' + name_template: "{{ .ProjectName }}_SHA256SUMS" algorithm: sha256 snapshot: - name_template: "{{ .Tag }}-next" -blobs: - - provider: s3 - bucket: snyk-assets - region: us-east-1 - folder: "cli/driftctl/{{.Tag}}" + version_template: "{{ .Tag }}-next" +# blobs: +# - provider: s3 +# bucket: snyk-assets +# region: us-east-1 +# directory: "cli/driftctl/{{.Tag}}" diff --git a/README.md b/README.md index 263e4a501..cd3f82c27 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,44 @@ -## This project is now in maintenance mode. We cannot promise to review contributions. Please feel free to fork the project to apply any changes you might want to make. +# `driftctl` (fork) +## This project was forked from `snyk/driftctl` which is now in maintenance mode +I ([seth](https://github.com/seth-acuitymd)) am going to see if I can get this project moving again, at least for my own use +I have also forked the `driftctl-action`, which is here: [seth-acuitymd/driftctl-action](https://github.com/seth-acuitymd/driftctl-action) +--- -

- driftctl -

+## What is `driftctl`? -

- - - - - - - - - - - -

+`driftctl` is a tool that measures infrastructure as code coverage, and tracks infrastructure drift from your Terraform code. -

- Measures infrastructure as code coverage, and tracks infrastructure drift.
- IaC: Terraform. Cloud providers: AWS, GitHub, Azure, GCP.
- :warning: This tool is still in beta state and will evolve in the future with potential breaking changes :warning: -

+Supports: -
- Packaging status - - Packaging status - -
+- IaC Providers: + - Terraform +- Cloud Providers: + - AWS + - Azure + - GCP -## Why driftctl ? +_some_ GitHub Support? + +:warning: - No guarantees on this project, I'm just doing this for my own use and hoping it'll pick up steam + +--- + +# Legacy README + +## Contents below this are from the original `snyk/driftctl` project and may not be accurate, current, and may be removed at some point + +## Why `driftctl` ? Infrastructure drift is a blind spot and a source of potential security issues. Drift can have multiple causes: from team members creating or updating infrastructure through the web console without backporting changes to Terraform, to unexpected actions from authenticated apps and services. You can't efficiently improve what you don't track. We track coverage for unit tests, why not infrastructure as code coverage? -Spot discrepancies as they happen: driftctl is a free and open-source CLI that warns of infrastructure drifts and fills in the missing piece in your DevSecOps toolbox. - +Spot discrepancies as they happen: `driftctl` is a free and open-source CLI that warns of infrastructure drifts and fills in the missing piece in your DevSecOps toolbox. ## Features @@ -58,8 +53,6 @@ Spot discrepancies as they happen: driftctl is a free and open-source CLI that w **[Installation](https://docs.driftctl.com/installation)** -**[Discord](https://discord.gg/7zHQ8r2PgP)** - ## Contribute To learn more about compiling driftctl and contributing, please refer to the [contribution guidelines](.github/CONTRIBUTING.md) and the [contributing guide](docs/README.md) for technical details. diff --git a/scripts/build.sh b/scripts/build.sh index 4d8e8b731..35673b661 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -17,7 +17,7 @@ SINGLE_TARGET="${SINGLE_TARGET:-false}" goreleaser check FLAGS="" -FLAGS+="--rm-dist " +FLAGS+="--clean " FLAGS+="--parallelism 2 " CMD="release"