-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0001d33
Showing
40 changed files
with
3,464 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Debricked Automations | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
vulnerabilities-scan: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.17' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/Library/Caches/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- run: | | ||
printf "$(go mod graph)\n\n$(go list -mod=readonly -e -m all)" > .debricked-go-dependencies.txt | ||
- uses: debricked/actions/scan@v1 | ||
env: | ||
DEBRICKED_TOKEN: ${{ secrets.DEBRICKED_TOKEN }} | ||
EXCLUDED_DIRECTORIES: "pkg/cmd/scan/testdata" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Vet | ||
run: go vet ./... | ||
|
||
- name: Test | ||
run: bash scripts/test.sh | ||
env: | ||
DEBRICKED_TOKEN: ${{ secrets.DEBRICKED_TOKEN }} | ||
|
||
- name: Test coverage | ||
run: bash scripts/check_coverage.sh | ||
env: | ||
TEST_COVERAGE_THRESHOLD: 90 | ||
|
||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: coverage.html | ||
path: coverage.html | ||
retention-days: 2 | ||
|
||
- name: Test - E2E | ||
run: go run cmd/debricked/main.go scan . -t ${{ secrets.DEBRICKED_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.vscode | ||
.idea | ||
coverage.out | ||
coverage.html | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
[Unreleased]: https://github.com/viktigpetterr/composer-template/compare/v1.0.0...HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM golang:1.17-alpine | ||
|
||
WORKDIR /debricked | ||
|
||
RUN apk add git | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
|
||
COPY . . | ||
|
||
RUN go install ./debricked.go | ||
|
||
ENTRYPOINT ["debricked"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Debricked AB. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
install: | ||
go install ./cmd/debricked | ||
test: | ||
bash scripts/test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Debricked CLI | ||
[![Test](https://github.com/viktigpetterr/debricked-go-cli/actions/workflows/test.yml/badge.svg)](https://github.com/viktigpetterr/debricked-go-cli/actions/workflows/test.yml) | ||
[![Debricked scan](https://github.com/viktigpetterr/debricked-go-cli/actions/workflows/debricked.yml/badge.svg)](https://github.com/viktigpetterr/debricked-go-cli/actions/workflows/debricked.yml) | ||
|
||
`debricked` is Debricked's own command line interface. It brings open source security, compliance and health to your project via the command prompt. | ||
|
||
![debricked-ship](https://debricked.com/build/images/spaceship.f6582850.svg) | ||
## Documentation | ||
Complete documentation can be found over at [Debricked](https://debricked.com/docs/integrations/cli.html#debricked-cli). | ||
## Contributing | ||
|
||
## Installation | ||
|
||
### Linux | ||
|
||
### Windows | ||
|
||
### MacOs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package main | ||
|
||
import ( | ||
"debricked/pkg/cmd/root" | ||
"fmt" | ||
"os" | ||
) | ||
|
||
func main() { | ||
if err := root.NewRootCmd().Execute(); err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module debricked | ||
|
||
go 1.17 | ||
|
||
require ( | ||
github.com/fatih/color v1.13.0 | ||
github.com/go-git/go-git/v5 v5.4.2 | ||
github.com/google/go-cmp v0.5.6 | ||
github.com/jedib0t/go-pretty/v6 v6.3.0 | ||
github.com/schollz/progressbar/v3 v3.8.6 | ||
github.com/spf13/cobra v1.3.0 | ||
) | ||
|
||
require ( | ||
github.com/Microsoft/go-winio v0.4.16 // indirect | ||
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect | ||
github.com/acomagu/bufpipe v1.0.3 // indirect | ||
github.com/emirpasic/gods v1.12.0 // indirect | ||
github.com/go-git/gcfg v1.5.0 // indirect | ||
github.com/go-git/go-billy/v5 v5.3.1 // indirect | ||
github.com/imdario/mergo v0.3.12 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect | ||
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect | ||
github.com/mattn/go-colorable v0.1.12 // indirect | ||
github.com/mattn/go-isatty v0.0.14 // indirect | ||
github.com/mattn/go-runewidth v0.0.13 // indirect | ||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/rivo/uniseg v0.2.0 // indirect | ||
github.com/sergi/go-diff v1.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/xanzy/ssh-agent v0.3.0 // indirect | ||
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 // indirect | ||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect | ||
golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0 // indirect | ||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect | ||
gopkg.in/warnings.v0 v0.1.2 // indirect | ||
) |
Oops, something went wrong.