Skip to content

Commit

Permalink
ci: Re-add secrets detector (#11038)
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Koenig <[email protected]>
  • Loading branch information
ko3n1g authored Oct 29, 2024
1 parent 7f3da35 commit 3209aea
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 40 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cicd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


jobs:
pre-flight:
runs-on: ubuntu-latest
Expand Down
64 changes: 33 additions & 31 deletions .github/workflows/secrets-detector.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
# # Copyright (c) 2020-2021, NVIDIA CORPORATION.
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
# # You may obtain a copy of the License at
# #
# # http://www.apache.org/licenses/LICENSE-2.0
# #
# # Unless required by applicable law or agreed to in writing, software
# # distributed under the License is distributed on an "AS IS" BASIS,
# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# # See the License for the specific language governing permissions and
# # limitations under the License.
# name: Secrets detector
# Copyright (c) 2020-2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Secrets detector

# on:
# pull_request:
on:
pull_request:
branches:
- 'main'

# jobs:
# main:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# path: ${{ github.run_id }}
# fetch-depth: 0
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.run_id }}
fetch-depth: 0

# - name: Install secrets detector
# run: pip install detect-secrets
- name: Install secrets detector
run: pip install detect-secrets

# - name: Run on change-set
# run: |
# cd ${{ github.run_id }}
# git diff --name-only --diff-filter=d --merge-base origin/${{ github.base_ref }} -z | xargs -0 detect-secrets-hook --baseline .github/workflows/config/.secrets.baseline
- name: Run on change-set
run: |
cd ${{ github.run_id }}
git diff --name-only --diff-filter=d --merge-base origin/main -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
18 changes: 9 additions & 9 deletions .github/workflows/config/.secrets.baseline → .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@
}
],
"results": {
".github/workflows/cicd-main.yml": [
".github/workflows/node-reboot.yml": [
{
"type": "Base64 High Entropy String",
"filename": ".github/workflows/cicd-main.yml",
"hashed_secret": "593951c440200143335452427205ae7c8580d463",
"type": "Secret Keyword",
"filename": ".github/workflows/node-reboot.yml",
"hashed_secret": "3e26d6750975d678acb8fa35a0f69237881576b0",
"is_verified": false,
"line_number": 1503
"line_number": 52
}
],
"docs/source/nlp/question_answering.rst": [
Expand Down Expand Up @@ -1229,9 +1229,9 @@
{
"type": "Base64 High Entropy String",
"filename": "tests/infer_data_path.py",
"hashed_secret": "e3fb89ccb261c88146519164f7e8a47786d33fee",
"hashed_secret": "8e0937151cfd9750db688fbe66be37d0c53ed6ab",
"is_verified": false,
"line_number": 271
"line_number": 63
}
],
"tutorials/asr/Multilang_ASR.ipynb": [
Expand Down Expand Up @@ -1902,7 +1902,7 @@
"filename": "tutorials/multimodal/Multimodal Data Preparation.ipynb",
"hashed_secret": "b641cbe299c9e27b480cc8a823bb020d45962236",
"is_verified": false,
"line_number": 660
"line_number": 658
}
],
"tutorials/nlp/ITN_with_Thutmose_Tagger.ipynb": [
Expand Down Expand Up @@ -2083,5 +2083,5 @@
}
]
},
"generated_at": "2024-09-08T19:00:15Z"
"generated_at": "2024-10-25T13:43:17Z"
}

0 comments on commit 3209aea

Please sign in to comment.