Skip to content
Open
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
27 changes: 11 additions & 16 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down Expand Up @@ -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.

29 changes: 20 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
project_name: driftctl
dist: bin
release:
Expand All @@ -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
Expand All @@ -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}}"
59 changes: 26 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

---

<p align="center">
<img width="200" src="https://docs.driftctl.com/img/driftctl_dark.svg" alt="driftctl">
</p>
## What is `driftctl`?

<p align="center">
<img src="https://circleci.com/gh/snyk/driftctl.svg?style=shield"/>
<img src="https://goreportcard.com/badge/github.com/snyk/driftctl"/>
<img src="https://img.shields.io/github/license/snyk/driftctl">
<img src="https://img.shields.io/github/v/release/snyk/driftctl">
<img src="https://img.shields.io/github/go-mod/go-version/snyk/driftctl">
<img src="https://img.shields.io/github/downloads/snyk/driftctl/total.svg"/>
<img src="https://img.shields.io/docker/pulls/snyk/driftctl"/>
<img src="https://img.shields.io/docker/image-size/snyk/driftctl"/>
<a href="https://discord.gg/NMCBxtD7Nd">
<img src="https://img.shields.io/discord/783720783469871124?color=%237289da&label=discord&logo=discord"/>
</a>
</p>
`driftctl` is a tool that measures infrastructure as code coverage, and tracks infrastructure drift from your Terraform code.

<p align="center">
Measures infrastructure as code coverage, and tracks infrastructure drift.<br>
<strong>IaC:</strong> Terraform. <strong>Cloud providers:</strong> AWS, GitHub, Azure, GCP.<br>
:warning: <strong>This tool is still in beta state and will evolve in the future with potential breaking changes</strong> :warning:
</p>
Supports:

<details>
<summary>Packaging status</summary>
<a href="https://repology.org/project/driftctl/versions">
<img src="https://repology.org/badge/vertical-allrepos/driftctl.svg" alt="Packaging status">
</a>
</details>
- 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

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SINGLE_TARGET="${SINGLE_TARGET:-false}"
goreleaser check

FLAGS=""
FLAGS+="--rm-dist "
FLAGS+="--clean "
FLAGS+="--parallelism 2 "

CMD="release"
Expand Down