-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
4 changed files
with
166 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,14 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
# specify the version you desire here | ||
- image: circleci/openjdk:8-jdk | ||
environment: | ||
# Customize the JVM maximum heap limit | ||
JVM_OPTS: -Xmx500m | ||
TERM: dumb | ||
steps: | ||
- checkout | ||
- run: gradle dependencies | ||
- run: gradle test |
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,99 @@ | ||
version: 2.1 | ||
orbs: | ||
insectest: | ||
jobs: | ||
inline_job: | ||
parameters: | ||
# url for nowsecure auto API | ||
auto_url: | ||
type: string | ||
default: https://lab-api.nowsecure.com | ||
# API token, visit https://docs.nowsecure.com/auto/integration-services/jenkins-integration to generate token | ||
auto_token: | ||
type: string | ||
default: $AUTO_TOKEN | ||
# Specify group if you belong to multiple groups | ||
auto_group: | ||
type: string | ||
default: $AUTO_GROUP | ||
# Specify artifacts-dir where security artifacts will be stored | ||
auto_dir: | ||
type: string | ||
default: "/tmp/workspace/nowsecure-auto-security-test" | ||
# Specify absolute path of mobile binary, you would need to attach workspace to this plugin step | ||
auto_file: | ||
type: string | ||
default: $AUTO_FILE | ||
# Specify maximum time to wait for results, if you specify 0 then plugin won't wait for the results | ||
auto_wait: | ||
type: string | ||
default: "30" | ||
# Specify minimum score the app should get from security testing, if you specify 0 then score won't be evaulated otherwise build will be marked as failure if security score is below this number | ||
auto_score: | ||
type: string | ||
default: "50" | ||
executor: inline_executor | ||
steps: | ||
- inline_command: | ||
auto_url: <<parameters.auto_url>> | ||
auto_token: <<parameters.auto_token>> | ||
auto_group: <<parameters.auto_group>> | ||
auto_dir: <<parameters.auto_dir>> | ||
auto_file: <<parameters.auto_file>> | ||
auto_wait: <<parameters.auto_wait>> | ||
auto_score: <<parameters.auto_score>> | ||
commands: | ||
inline_command: | ||
parameters: | ||
# url for nowsecure auto API | ||
auto_url: | ||
type: string | ||
default: https://lab-api.nowsecure.com | ||
# API token, visit https://docs.nowsecure.com/auto/integration-services/jenkins-integration to generate token | ||
auto_token: | ||
type: string | ||
default: $AUTO_TOKEN | ||
# Specify group if you belong to multiple groups | ||
auto_group: | ||
type: string | ||
default: $AUTO_GROUP | ||
# Specify artifacts-dir where security artifacts will be stored | ||
auto_dir: | ||
type: string | ||
default: "/tmp/workspace/nowsecure-auto-security-test" | ||
# Specify absolute path of mobile binary, you would need to attach workspace to this plugin step | ||
auto_file: | ||
type: string | ||
default: $AUTO_FILE | ||
# Specify maximum time to wait for results, if you specify 0 then plugin won't wait for the results | ||
auto_wait: | ||
type: string | ||
default: "30" | ||
# Specify minimum score the app should get from security testing, if you specify 0 then score won't be evaulated otherwise build will be marked as failure if security score is below this number | ||
auto_score: | ||
type: string | ||
default: "50" | ||
steps: | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- run: cp apkpure_app_887.apk /tmp/workspace/test.apk | ||
- run: curl -Ls https://github.com/bhatti/circle-auto/archive/0.3.tar.gz | tar -xzf - -C . | ||
- run: cd circle-auto-0.3 && gradle run -Dauto.url=<< parameters.auto_url >> -Dauto.token=<< parameters.auto_token >> -Dauto.dir=<< parameters.auto_dir >> -Dauto.file=<< parameters.auto_file >> -Dauto.group=<< parameters.auto_group >> -Dauto.wait=<< parameters.auto_wait >> -Dauto.score=<< parameters.auto_score >> | ||
- persist_to_workspace: | ||
root: /tmp/workspace | ||
paths: | ||
- nowsecure-auto-security-test/* | ||
- store_artifacts: | ||
path: /tmp/workspace/nowsecure-auto-security-test | ||
destination: nowsecure-auto-security-test | ||
executors: | ||
inline_executor: | ||
docker: | ||
- image: circleci/openjdk:8-jdk-node | ||
environment: | ||
TERM: dumb | ||
workflows: | ||
test: | ||
jobs: | ||
- insectest/inline_job: | ||
auto_file: /tmp/workspace/test.apk |
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,53 @@ | ||
version: 2.1 | ||
description: CircleCI orb for NowSecure AUTO that provides fully automated, mobile | ||
appsec testing coverage | ||
executors: | ||
default: | ||
description: Java docker container to use when running the NowSecure AUTO orb | ||
docker: | ||
- image: circleci/openjdk:8-jdk-node | ||
environment: | ||
TERM: dumb | ||
commands: | ||
sectest: | ||
description: Executes security test using NowSecure AUTO. | ||
parameters: | ||
# url for nowsecure auto API | ||
auto_url: | ||
type: string | ||
default: https://lab-api.nowsecure.com | ||
# API token, visit https://docs.nowsecure.com/auto/integration-services/jenkins-integration to generate token | ||
auto_token: | ||
type: string | ||
default: $AUTO_TOKEN | ||
# Specify group if you belong to multiple groups | ||
auto_group: | ||
type: string | ||
default: $AUTO_GROUP | ||
# Specify artifacts-dir where security artifacts will be stored | ||
auto_dir: | ||
type: string | ||
default: "/tmp/workspace/nowsecure-auto-security-test" | ||
# Specify absolute path of mobile binary, you would need to attach workspace to this plugin step | ||
auto_file: | ||
type: string | ||
# Specify maximum time to wait for results, if you specify 0 then plugin won't wait for the results | ||
auto_wait: | ||
type: string | ||
default: "30" | ||
# Specify minimum score the app should get from security testing, if you specify 0 then score won't be evaulated otherwise build will be marked as failure if security score is below this number | ||
auto_score: | ||
type: string | ||
default: "50" | ||
steps: | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- run: curl -Ls https://github.com/bhatti/circle-auto/archive/0.3.tar.gz | tar -xzf - -C . | ||
- run: cd circle-auto-0.3 && gradle run -Dauto.url=<< parameters.auto_url >> -Dauto.token=<< parameters.auto_token >> -Dauto.dir=<< parameters.auto_dir >> -Dauto.file=<< parameters.auto_file >> -Dauto.group=<< parameters.auto_group >> -Dauto.wait=<< parameters.auto_wait >> -Dauto.score=<< parameters.auto_score >> | ||
- persist_to_workspace: | ||
root: /tmp/workspace | ||
paths: | ||
- nowsecure-auto-security-test/* | ||
- store_artifacts: | ||
path: /tmp/workspace/nowsecure-auto-security-test | ||
destination: nowsecure-auto-security-test |
Binary file not shown.