From cae39814e4ad03bf0fe4d7229775841b8e775115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hector=20Cust=C3=B3dio?= Date: Thu, 24 Mar 2022 11:21:12 -0300 Subject: [PATCH] feat: Adds horusec token (#74) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds horusec token Signed-off-by: Hector Custódio * Fixes typo Signed-off-by: Hector Custódio --- .github/workflows/horusec-pr.yml | 42 ++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/.github/workflows/horusec-pr.yml b/.github/workflows/horusec-pr.yml index a16a553..cc37aa7 100644 --- a/.github/workflows/horusec-pr.yml +++ b/.github/workflows/horusec-pr.yml @@ -14,23 +14,33 @@ # limitations under the License. # -name: Horusec Validation +name: Horusec Pull Request on: - pull_request: - branches: - - main - - horusec - - release/* + pull_request: + branches: + - main + - horusec + - release/* + jobs: - horusec-validation: - name: Horusec Validation - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v2 + horusec: + name: horusec + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + with: + depth: 0 - - name: Running Horusec - run: | - curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest-rc - horusec start -p . -e true -u "https://api-horusec.zup.com.br" -G true -n "${GITHUB_REPOSITORY}_${GITHUB_REF##*/}" \ No newline at end of file + - name: Running Horusec + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HORUSEC_CLI_REPOSITORY_AUTHORIZATION: ${{secrets.HORUSEC_TOKEN}} + HORUSEC_CLI_HORUSEC_API_URI: "https://api-horusec.zup.com.br" + HORUSEC_CLI_REPOSITORY_NAME: ${{ github.event.pull_request.head.repo.full_name }} + REPOSITORY_OWNER: ${{ github.event.pull_request.head.repo.full_name }} + run: | + echo "Repository Owner is: ${{env.REPOSITORY_OWNER}}" + curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest-rc + horusec start -p . -e=$(if [ "${{env.REPOSITORY_OWNER}}" == "ZupIT/beagle-backend-kotlin" ]; then echo "true"; else echo "false"; fi) -G true \ No newline at end of file