diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b46fc2d..bcb7d8b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,6 +19,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Check for plain text password + run: | + search_result=$(grep -r -i -n -o -E "(password|pwd|pass)[[:space:]]*(=|:)*[[:space:]]*[[:alpha:]]+" $GITHUB_WORKSPACE) + + if [[ $search_result ]]; then + echo "Sensitive data found! Check it out! \n $search_result" + exit 1 + else + echo "Sensitive data not found, everything's ok" + fi - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -57,4 +67,4 @@ jobs: with: github-token: ${{ secrets.github_token }} path-to-lcov: "./coverage.lcov" - parallel-finished: true \ No newline at end of file + parallel-finished: true diff --git a/top_secret_stuff.txt b/top_secret_stuff.txt index 190aa14..cb33211 100644 --- a/top_secret_stuff.txt +++ b/top_secret_stuff.txt @@ -1,2 +1,3 @@ password = "plain_text_password_1234" +pwd: asdf user = "superDuperUser"