scorecard/probes/freeOfUnverifiedBinaryArtifacts/def.yml
AdamKorcz cb721a8526
🌱 convert binary artifact check to probe (#3508)
* 🌱 convert binary artifact check to probe

Signed-off-by: AdamKorcz <adam@adalogics.com>

* Reword motivation

Signed-off-by: AdamKorcz <adam@adalogics.com>

* remove unused variable in test

Signed-off-by: AdamKorcz <adam@adalogics.com>

* remove positiveOutcome() and length check

Signed-off-by: AdamKorcz <adam@adalogics.com>

* fix wrong check name

Signed-off-by: AdamKorcz <adam@adalogics.com>

* Split into two probes: One with and one without gradle-wrappers

Signed-off-by: AdamKorcz <adam@adalogics.com>

* Add description about what Scorecard considers a verified binary

Signed-off-by: Adam Korczynski <adam@adalogics.com>

* change 'trusted' to 'verified'

Signed-off-by: Adam Korczynski <adam@adalogics.com>

* remove nil check

Signed-off-by: Adam Korczynski <adam@adalogics.com>

* remove filtering

Signed-off-by: Adam Korczynski <adam@adalogics.com>

* use const scores in tests

Signed-off-by: Adam Korczynski <adam@adalogics.com>

* rename test

Signed-off-by: Adam Korczynski <adam@adalogics.com>

* add sanity check in loop

Signed-off-by: Adam Korczynski <adam@adalogics.com>

* rename binary file const

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 00:24:16 -08:00

29 lines
1.8 KiB
YAML

# 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: freeOfUnverifiedBinaryArtifacts
short: Checks if the project has binary files in its source tree. The probe skips verified binary files which currently are gradle-wrappers.
motivation: >
Binary files are not readable so users can't see what they do. Many programming language systems can generate executables from source code (e.g., C/C++ generated machine code, Java .class files, Python .pyc files, and minified JavaScript). Users will often directly use executables if they are included in the source repository, leading to many dangerous behaviors.
implementation: >
The implementation looks for the presence of binary files that are not "verified". A verified binary is one that Scorecard considers valid for building and/or releasing the project. This is a more permissive probe than "freeOfAnyBinaryArtifacts" which does not skip verified binary files.
outcome:
- If the probe finds unverified binary files, it returns a number of negative outcomes equal to the number of unverified binary files found. Each outcome includes a location of the file.
- If the probe finds no unverified binary files, it returns a single positive outcome.
remediation:
effort: Medium
text:
- Remove the generated executable artifacts from the repository.
- Build from source.