Compare commits

..

12 commits
1.1.0 ... main

Author SHA1 Message Date
Ahmed Hemdan
ad30546fc4 Merge branch 'bump-version-to-7' into 'main'
Bump version to 7

See merge request components/secret-detection!10
2025-04-23 09:36:59 +02:00
Ahmed Hemdan
e1192e05d1 Fix spacing 2025-04-22 10:32:37 +02:00
Ahmed Hemdan
54aa5f1aa9 Update README.md 2025-04-22 10:32:02 +02:00
Ahmed Hemdan
d5021f7972
Bump version to 7 2025-04-21 23:41:40 +02:00
Ahmed Hemdan
94147813a3 Merge branch 'add-license' into 'main'
Add LICENSE

See merge request components/secret-detection!9
2025-02-14 13:53:09 +00:00
Ahmed Hemdan
f945a715cd
Add LICENSE 2025-02-14 11:17:45 +01:00
Ahmed Hemdan
6f289fc315 Merge branch 'add-codeowners-file' into 'main'
Add a codeowners file

See merge request components/secret-detection!6
2024-07-18 18:31:54 +00:00
Ahmed Hemdan
5e5d5be4d6
Add a codeowners file 2024-07-18 19:37:55 +02:00
Fabio Pitino
646d0fcbbf Merge branch 'run-some-jobs-only-on-gitlab-com' into 'main'
Run a couple of jobs only on Gitlab.com

See merge request components/secret-detection!5
2024-06-25 18:05:28 +00:00
Ahmed Hemdan
d9f655a96a
Run a couple of jobs only on Gitlab.com 2024-06-25 14:58:08 +02:00
Lee Tickett
ef4d34b9d0 Merge branch 'server-variables' into 'main'
Use CI_ variables to allow mirroring to other gitlab instances

See merge request components/secret-detection!4
2024-06-18 14:46:28 +00:00
Duncan Macleod
836ee40654
use CI_ variables to allow mirroring to other gitlab instances 2024-04-24 13:41:38 +01:00
5 changed files with 31 additions and 5 deletions

View file

@ -1,5 +1,5 @@
include: include:
component: gitlab.com/$CI_PROJECT_PATH/secret-detection@$CI_COMMIT_SHA component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/secret-detection@$CI_COMMIT_SHA
stages: [test, release] stages: [test, release]
@ -14,11 +14,13 @@ ensure-job-added:
script: script:
- echo "Expect that a job named 'secret_detection' is added to the pipeline" - echo "Expect that a job named 'secret_detection' is added to the pipeline"
- | - |
route="https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs" route="$CI_API_V4_URL/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs"
count=`curl --silent $route | jq 'map(select(.name | contains("secret_detection"))) | length'` count=`curl --silent $route | jq 'map(select(.name | contains("secret_detection"))) | length'`
if [ "$count" != "1" ]; then if [ "$count" != "1" ]; then
exit 1 exit 1
fi fi
rules:
- if: ($CI_COMMIT_BRANCH || $CI_COMMIT_TAG) && $CI_SERVER_HOST =~ /gitlab.com/
# Ensure that a project description exists, because it will be important to display # Ensure that a project description exists, because it will be important to display
# the resource in the catalog. # the resource in the catalog.
@ -26,7 +28,7 @@ check-description:
image: badouralix/curl-jq image: badouralix/curl-jq
script: script:
- | - |
route="https://gitlab.com/api/v4/projects/$CI_PROJECT_ID" route="$CI_API_V4_URL/projects/$CI_PROJECT_ID"
desc=`curl --silent $route | jq '.description'` desc=`curl --silent $route | jq '.description'`
if [ "$desc" = "null" ]; then if [ "$desc" = "null" ]; then
echo "Description not set. Please set a projet description" echo "Description not set. Please set a projet description"
@ -34,6 +36,8 @@ check-description:
else else
echo "Description set" echo "Description set"
fi fi
rules:
- if: $CI_SERVER_HOST =~ /gitlab.com/
# Ensure that a `README.md` exists in the root directory as it represents the # Ensure that a `README.md` exists in the root directory as it represents the
# documentation for the whole components repository. # documentation for the whole components repository.

1
CODEOWNERS Normal file
View file

@ -0,0 +1 @@
* @gitlab-org/secure/secret-detection

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 GitLab Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -40,7 +40,7 @@ This assumes `SECRET_DETECTION_DISABLED` variable is already defined in `.gitlab
| ----- | ------------- | ----------- | | ----- | ------------- | ----------- |
| `stage` | `test` | The stage where you want the job to be added. | | `stage` | `test` | The stage where you want the job to be added. |
| `image_prefix` | `$CI_TEMPLATE_REGISTRY_HOST/security-products` | Override the name of the Docker registry providing the default images (proxy). | | `image_prefix` | `$CI_TEMPLATE_REGISTRY_HOST/security-products` | Override the name of the Docker registry providing the default images (proxy). |
| `image_tag` | `5` | Override the default version of the `secrets` analyzer image. | | `image_tag` | `7` | Override the default version of the `secrets` analyzer image. |
| `image_suffix` | `""` | Suffix added to the image name. If set to -fips, [FIPS-enabled images](https://docs.gitlab.com/ee/user/application_security/secret_detection/#use-fips-enabled-images) are used for scan. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355519) in GitLab 14.10. | | `image_suffix` | `""` | Suffix added to the image name. If set to -fips, [FIPS-enabled images](https://docs.gitlab.com/ee/user/application_security/secret_detection/#use-fips-enabled-images) are used for scan. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355519) in GitLab 14.10. |
### Variables ### Variables

View file

@ -5,7 +5,7 @@ spec:
image_prefix: image_prefix:
default: "$CI_TEMPLATE_REGISTRY_HOST/security-products" default: "$CI_TEMPLATE_REGISTRY_HOST/security-products"
image_tag: image_tag:
default: '6' default: '7'
image_suffix: image_suffix:
default: "" default: ""
--- ---