scorecard/probes/webhooksUseSecrets/def.yml

43 lines
2.5 KiB
YAML
Raw Permalink Normal View History

:seedling: convert Webhook check to probes (#3522) * :seedling: convert Webhook check to probes Signed-off-by: AdamKorcz <adam@adalogics.com> * Add test + nits Signed-off-by: AdamKorcz <adam@adalogics.com> * replace probe with OutcomeNotApplicable Signed-off-by: AdamKorcz <adam@adalogics.com> * return one finding per webhook Signed-off-by: Adam Korczynski <adam@adalogics.com> * change wording in def.yml Signed-off-by: Adam Korczynski <adam@adalogics.com> * change wording in def.yml and checks.md Signed-off-by: Adam Korczynski <adam@adalogics.com> * remove unused struct in test Signed-off-by: Adam Korczynski <adam@adalogics.com> * align checks.md with checks.yaml Signed-off-by: Adam Korczynski <adam@adalogics.com> * bring back experimental for webhooks Signed-off-by: Adam Korczynski <adam@adalogics.com> * change 'token' to 'secret' in probe Signed-off-by: Adam Korczynski <adam@adalogics.com> * use checker.MinResultScore instead of 0 Signed-off-by: Adam Korczynski <adam@adalogics.com> * Change test name Signed-off-by: Adam Korczynski <adam@adalogics.com> * use checker.MinResultScore instead of 0 Signed-off-by: Adam Korczynski <adam@adalogics.com> * fix typo Signed-off-by: Adam Korczynski <adam@adalogics.com> * Use checker.MaxResultScore instead of 10 Signed-off-by: Adam Korczynski <adam@adalogics.com> * rename probe Signed-off-by: Adam Korczynski <adam@adalogics.com> * remove the 'totalWebhooks' value from findings Signed-off-by: Adam Korczynski <adam@adalogics.com> --------- Signed-off-by: AdamKorcz <adam@adalogics.com> Signed-off-by: Adam Korczynski <adam@adalogics.com>
2023-12-05 21:59:42 +03:00
# Copyright 2023 OpenSSF Scorecard Authors
#
# 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.
id: webhooksUseSecrets
lifecycle: experimental
:seedling: convert Webhook check to probes (#3522) * :seedling: convert Webhook check to probes Signed-off-by: AdamKorcz <adam@adalogics.com> * Add test + nits Signed-off-by: AdamKorcz <adam@adalogics.com> * replace probe with OutcomeNotApplicable Signed-off-by: AdamKorcz <adam@adalogics.com> * return one finding per webhook Signed-off-by: Adam Korczynski <adam@adalogics.com> * change wording in def.yml Signed-off-by: Adam Korczynski <adam@adalogics.com> * change wording in def.yml and checks.md Signed-off-by: Adam Korczynski <adam@adalogics.com> * remove unused struct in test Signed-off-by: Adam Korczynski <adam@adalogics.com> * align checks.md with checks.yaml Signed-off-by: Adam Korczynski <adam@adalogics.com> * bring back experimental for webhooks Signed-off-by: Adam Korczynski <adam@adalogics.com> * change 'token' to 'secret' in probe Signed-off-by: Adam Korczynski <adam@adalogics.com> * use checker.MinResultScore instead of 0 Signed-off-by: Adam Korczynski <adam@adalogics.com> * Change test name Signed-off-by: Adam Korczynski <adam@adalogics.com> * use checker.MinResultScore instead of 0 Signed-off-by: Adam Korczynski <adam@adalogics.com> * fix typo Signed-off-by: Adam Korczynski <adam@adalogics.com> * Use checker.MaxResultScore instead of 10 Signed-off-by: Adam Korczynski <adam@adalogics.com> * rename probe Signed-off-by: Adam Korczynski <adam@adalogics.com> * remove the 'totalWebhooks' value from findings Signed-off-by: Adam Korczynski <adam@adalogics.com> --------- Signed-off-by: AdamKorcz <adam@adalogics.com> Signed-off-by: Adam Korczynski <adam@adalogics.com>
2023-12-05 21:59:42 +03:00
short: This check determines whether the webhooks defined in the repository have secrets configured to authenticate the origins of requests.
motivation: >
Webhooks without secret authorization have the potential to make projects accessible to third-parties.
implementation: >
The probe checks all webhooks of a project and checks whether each uses secret authentication.
outcome:
- The probe returns one OutcomeTrue per webhook with secret authorization.
- The probe returns one OutcomeFalse per webhook without secret authorization.
- Projects without webhooks receive an OutcomeNotApplicable.
:seedling: convert Webhook check to probes (#3522) * :seedling: convert Webhook check to probes Signed-off-by: AdamKorcz <adam@adalogics.com> * Add test + nits Signed-off-by: AdamKorcz <adam@adalogics.com> * replace probe with OutcomeNotApplicable Signed-off-by: AdamKorcz <adam@adalogics.com> * return one finding per webhook Signed-off-by: Adam Korczynski <adam@adalogics.com> * change wording in def.yml Signed-off-by: Adam Korczynski <adam@adalogics.com> * change wording in def.yml and checks.md Signed-off-by: Adam Korczynski <adam@adalogics.com> * remove unused struct in test Signed-off-by: Adam Korczynski <adam@adalogics.com> * align checks.md with checks.yaml Signed-off-by: Adam Korczynski <adam@adalogics.com> * bring back experimental for webhooks Signed-off-by: Adam Korczynski <adam@adalogics.com> * change 'token' to 'secret' in probe Signed-off-by: Adam Korczynski <adam@adalogics.com> * use checker.MinResultScore instead of 0 Signed-off-by: Adam Korczynski <adam@adalogics.com> * Change test name Signed-off-by: Adam Korczynski <adam@adalogics.com> * use checker.MinResultScore instead of 0 Signed-off-by: Adam Korczynski <adam@adalogics.com> * fix typo Signed-off-by: Adam Korczynski <adam@adalogics.com> * Use checker.MaxResultScore instead of 10 Signed-off-by: Adam Korczynski <adam@adalogics.com> * rename probe Signed-off-by: Adam Korczynski <adam@adalogics.com> * remove the 'totalWebhooks' value from findings Signed-off-by: Adam Korczynski <adam@adalogics.com> --------- Signed-off-by: AdamKorcz <adam@adalogics.com> Signed-off-by: Adam Korczynski <adam@adalogics.com>
2023-12-05 21:59:42 +03:00
remediation:
2024-04-11 00:12:53 +03:00
onOutcome: False
:seedling: convert Webhook check to probes (#3522) * :seedling: convert Webhook check to probes Signed-off-by: AdamKorcz <adam@adalogics.com> * Add test + nits Signed-off-by: AdamKorcz <adam@adalogics.com> * replace probe with OutcomeNotApplicable Signed-off-by: AdamKorcz <adam@adalogics.com> * return one finding per webhook Signed-off-by: Adam Korczynski <adam@adalogics.com> * change wording in def.yml Signed-off-by: Adam Korczynski <adam@adalogics.com> * change wording in def.yml and checks.md Signed-off-by: Adam Korczynski <adam@adalogics.com> * remove unused struct in test Signed-off-by: Adam Korczynski <adam@adalogics.com> * align checks.md with checks.yaml Signed-off-by: Adam Korczynski <adam@adalogics.com> * bring back experimental for webhooks Signed-off-by: Adam Korczynski <adam@adalogics.com> * change 'token' to 'secret' in probe Signed-off-by: Adam Korczynski <adam@adalogics.com> * use checker.MinResultScore instead of 0 Signed-off-by: Adam Korczynski <adam@adalogics.com> * Change test name Signed-off-by: Adam Korczynski <adam@adalogics.com> * use checker.MinResultScore instead of 0 Signed-off-by: Adam Korczynski <adam@adalogics.com> * fix typo Signed-off-by: Adam Korczynski <adam@adalogics.com> * Use checker.MaxResultScore instead of 10 Signed-off-by: Adam Korczynski <adam@adalogics.com> * rename probe Signed-off-by: Adam Korczynski <adam@adalogics.com> * remove the 'totalWebhooks' value from findings Signed-off-by: Adam Korczynski <adam@adalogics.com> --------- Signed-off-by: AdamKorcz <adam@adalogics.com> Signed-off-by: Adam Korczynski <adam@adalogics.com>
2023-12-05 21:59:42 +03:00
effort: Low
text:
- Check if the service your webhooks is configured with supports secrets.
- If there is support for secret authentication, set the secret in the webhook configuration. See [Setting up a webhook](https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks#setting-up-a-webhook).
- If there is no support for secret authentication, request the webhook service implement secret authentication functionality by following [these directions](https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks).
markdown:
- Check if the service your webhooks is configured with supports secrets.
- If there is support for secret authentication, set the secret in the webhook configuration. See [Setting up a webhook](https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks#setting-up-a-webhook).
- If there is no support for secret authentication, request the webhook service implement secret authentication functionality by following [these directions](https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks).
ecosystem:
languages:
- all
clients:
- github
- gitlab