Files
component-detection-depende…/README.md
T

44 lines
2.5 KiB
Markdown
Raw Normal View History

2023-04-07 16:22:20 -07:00
# Component detection dependency submission action
2022-08-25 09:12:00 -07:00
2025-06-12 11:56:06 +01:00
This GitHub Action runs the [microsoft/component-detection](https://github.com/microsoft/component-detection) library to automate dependency extraction at build time. It uses a combination of static and dynamic scanning to build a dependency tree and then uploads that to GitHub's dependency graph via the dependency submission API. This gives you more accurate Dependabot alerts, and support for a bunch of additional ecosystems.
2022-08-25 09:12:00 -07:00
2022-10-04 15:27:26 -07:00
### Example workflow
2023-01-20 01:49:01 +00:00
2022-08-25 09:12:00 -07:00
```yaml
2023-01-22 01:08:40 +00:00
name: Component Detection
2022-10-04 15:27:26 -07:00
2023-01-20 01:49:01 +00:00
on:
2022-10-04 15:27:26 -07:00
workflow_dispatch:
2023-01-20 01:49:01 +00:00
push:
2022-10-04 15:27:26 -07:00
2025-06-12 11:56:06 +01:00
permissions:
2023-01-19 18:05:50 -08:00
id-token: write
contents: write
2022-10-04 15:27:26 -07:00
jobs:
2023-01-20 01:49:01 +00:00
dependency-submission:
2022-10-04 15:27:26 -07:00
runs-on: ubuntu-latest
steps:
2023-01-20 01:49:01 +00:00
- uses: actions/checkout@v3
2025-06-12 11:56:06 +01:00
- name: Component detection
2024-09-30 11:23:11 -07:00
uses: advanced-security/[email protected]
2025-06-12 11:56:06 +01:00
```
2023-01-22 20:03:17 +00:00
### Configuration options
2025-06-12 11:56:06 +01:00
| Parameter | Description | Example |
| --- | --- | --- |
2023-01-22 20:03:17 +00:00
filePath | The path to the directory containing the environment files to upload. Defaults to Actions working directory. | `'.'`
directoryExclusionList | Filters out specific directories following a minimatch pattern. | `test`
detectorArgs | Comma separated list of properties that can affect the detectors execution, like EnableIfDefaultOff that allows a specific detector that is in beta to run, the format for this property is DetectorId=EnableIfDefaultOff, for example Pip=EnableIfDefaultOff. | `Pip=EnableIfDefaultOff`
2025-06-12 11:56:06 +01:00
dockerImagesToScan |Comma separated list of docker image names or hashes to execute container scanning on | ubuntu:16.04,56bab49eef2ef07505f6a1b0d5bd3a601dfc3c76ad4460f24c91d6fa298369ab |
2023-01-22 20:03:17 +00:00
detectorsFilter | A comma separated list with the identifiers of the specific detectors to be used. | `Pip, RustCrateDetector`
2025-06-12 11:56:06 +01:00
detectorsCategories | A comma separated list with the categories of components that are going to be scanned. The detectors that are going to run are the ones that belongs to the categories. The possible values are: Npm, NuGet, Maven, RubyGems, Cargo, Pip, GoMod, CocoaPods, Linux. | `Npm,Maven,Pip`
2025-04-03 05:21:10 +00:00
correlator | An optional identifier to distinguish between multiple dependency snapshots of the same type. Defaults to the [job_id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_id) of the current job | `csharp-backend`
2023-01-22 20:03:17 +00:00
2023-01-22 12:28:52 -08:00
For more information: https://github.com/microsoft/component-detection
2023-04-07 16:21:17 -07:00
# License
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](LICENSE.md) for the full terms.