Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Change check milestone rules #342

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflow_templates/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2024 Flant JSC
#
# 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: gitleaks
on:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # run once a day at 4 AM
jobs:
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
36 changes: 36 additions & 0 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# THIS FILE IS GENERATED, PLEASE DO NOT EDIT.
#

# Copyright 2024 Flant JSC
#
# 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: gitleaks
on:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # run once a day at 4 AM
jobs:
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
6 changes: 6 additions & 0 deletions 1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"credentional": {
"user": "testuser",
"password": "deese0wie2tahph2mooyaiPoorie0Nah"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 42e7604.
If this secret is a true positive, please rotate the secret ASAP.

If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.

echo 42e7604e95099783626dca9c46edb27436db70f7:1.json:generic-api-key:4 >> .gitleaksignore

}
}
10 changes: 10 additions & 0 deletions 1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

url="https://api.github.com"
token="ghp_CTbv1bPL14y0TtwfPveRYS3Cred4oken"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 42e7604.
If this secret is a true positive, please rotate the secret ASAP.

If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.

echo 42e7604e95099783626dca9c46edb27436db70f7:1.sh:generic-api-key:4 >> .gitleaksignore


curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${token}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
${url}/repos/OWNER/REPO/pulls
4 changes: 4 additions & 0 deletions 2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

var="ewogICJjcmVkZW50aW9uYWwiOiB7CiAgICAidXNlciI6ICJ0ZXN0dXNlciIsCiAgICAicGFzc3dvcmQiOiAiZGVlc2Uwd2llMnRhaHBoMm1vb3lhaVBvb3JpZTBOYWgiCiAgfQp9Cg=="
echo $var
8 changes: 8 additions & 0 deletions id-rsa
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Тестовый ключ для проверки gitleaks
-----BEGIN OPENSSH PRIVATE KEY-----

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Gitleaks has detected a secret with rule-id private-key in commit 42e7604.
If this secret is a true positive, please rotate the secret ASAP.

If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.

echo 42e7604e95099783626dca9c46edb27436db70f7:id-rsa:private-key:2 >> .gitleaksignore

b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACAv4dpI0AGiD1J2GdUJ0e+tczr2+tbBxe0G8R6wHoJUXgAAAJhdCrO4XQqz
uAAAAAtzc2gtZWQyNTUxOQAAACAv4dpI0AGiD1J2GdUJ0e+tczr2+tbBxe0G8R6wHoJUXg
AAAECwx4OZhkgo8MhWUhLBr+fobg7Gy93EA3vhkt9iTFxjXi/h2kjQAaIPUnYZ1QnR761z
Ovb61sHF7QbxHrAeglReAAAAEXJvb3RAMDY2NTIyNmUxZTRjAQIDBA==
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions id-rsa-b64
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IyDQotC10YHRgtC+0LLRi9C5INC60LvRjtGHINC00LvRjyDQv9GA0L7QstC10YDQutC4IGdpdGxlYWtzCi0tLS0tQkVHSU4gT1BFTlNTSCBQUklWQVRFIEtFWS0tLS0tCmIzQmxibk56YUMxclpYa3RkakVBQUFBQUJHNXZibVVBQUFBRWJtOXVaUUFBQUFBQUFBQUJBQUFBTXdBQUFBdHpjMmd0WlcKUXlOVFV4T1FBQUFDQXY0ZHBJMEFHaUQxSjJHZFVKMGUrdGN6cjIrdGJCeGUwRzhSNndIb0pVWGdBQUFKaGRDck80WFFxegp1QUFBQUF0emMyZ3RaV1F5TlRVeE9RQUFBQ0F2NGRwSTBBR2lEMUoyR2RVSjBlK3RjenIyK3RiQnhlMEc4UjZ3SG9KVVhnCkFBQUVDd3g0T1poa2dvOE1oV1VoTEJyK2ZvYmc3R3k5M0VBM3Zoa3Q5aVRGeGpYaS9oMmtqUUFhSVBVbllaMVFuUjc2MXoKT3ZiNjFzSEY3UWJ4SHJBZWdsUmVBQUFBRVhKdmIzUkFNRFkyTlRJeU5tVXhaVFJqQVFJREJBPT0KLS0tLS1FTkQgT1BFTlNTSCBQUklWQVRFIEtFWS0tLS0tCg==
Loading