From 3e664b41deb24f734bd51fb098523114d898f8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hector=20Cust=C3=B3dio?= Date: Tue, 22 Mar 2022 09:02:09 -0300 Subject: [PATCH 1/2] Adds horusec token MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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..8278bdc 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-android" ]; then echo "true"; else echo "false"; fi) -G true \ No newline at end of file From d2ee68ecfffdb5ed22c2f676712eb993f203b218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hector=20Cust=C3=B3dio?= Date: Tue, 22 Mar 2022 09:04:30 -0300 Subject: [PATCH 2/2] Fixes typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hector Custódio --- .github/workflows/horusec-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/horusec-pr.yml b/.github/workflows/horusec-pr.yml index 8278bdc..cc37aa7 100644 --- a/.github/workflows/horusec-pr.yml +++ b/.github/workflows/horusec-pr.yml @@ -43,4 +43,4 @@ jobs: 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-android" ]; then echo "true"; else echo "false"; fi) -G true \ No newline at end of file + 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