Skip to content

Commit 630165e

Browse files
authored
Merge pull request #161 from advanced-security/document-EnableIfDefaultOff-detectorArgs
Revise README for workflows and detector options
2 parents 332c61a + d177d78 commit 630165e

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
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.
44

5-
### Example workflow
5+
### Example workflows
66

77
```yaml
88

@@ -25,13 +25,40 @@ jobs:
2525
uses: advanced-security/component-detection-dependency-submission-action@v0.1.1
2626
```
2727
28+
Additional `Experimental` and `DefaultOff` detectors:
29+
- For a list of experimental and default-off detectors that require explicit enablement, see the [Detectors README](https://github.com/microsoft/component-detection/blob/main/docs/detectors/README.md). See [enable-default-off.md](https://github.com/microsoft/component-detection/blob/main/docs/enable-default-off.md) for more details.
30+
31+
```yaml
32+
name: Component Detection
33+
34+
on:
35+
workflow_dispatch:
36+
push:
37+
38+
permissions:
39+
id-token: write
40+
contents: write
41+
42+
jobs:
43+
dependency-submission:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v3
47+
- name: Component detection
48+
uses: advanced-security/component-detection-dependency-submission-action@v0.1.1
49+
with:
50+
# Experimental detectors: Poetry, UvLock, NpmLockfile3, Ivy
51+
# Default-off detectors: ConanLock, CondaLock, Dockerfile, Pip, SimplePip, Spdx22, SwiftResolved
52+
detectorArgs: Poetry=EnableIfDefaultOff,UvLock=EnableIfDefaultOff,NpmLockfile3=EnableIfDefaultOff,Ivy=EnableIfDefaultOff,ConanLock=EnableIfDefaultOff,CondaLock=EnableIfDefaultOff,Dockerfile=EnableIfDefaultOff,Pip=EnableIfDefaultOff,SimplePip=EnableIfDefaultOff,Spdx22=EnableIfDefaultOff,SwiftResolved=EnableIfDefaultOff
53+
```
54+
2855
### Configuration options
2956

3057
| Parameter | Description | Example |
3158
| --- | --- | --- |
3259
filePath | The path to the directory containing the environment files to upload. Defaults to Actions working directory. | `'.'`
3360
directoryExclusionList | Filters out specific directories following a minimatch pattern. | `test`
34-
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`
61+
detectorArgs | Comma separated list of properties that can affect the detectors execution, like EnableIfDefaultOff that allows a specific detector that is `Experimental` or `DefaultOff` to run, the format for this property is DetectorId=EnableIfDefaultOff, for example Pip=EnableIfDefaultOff. | `Pip=EnableIfDefaultOff`
3562
dockerImagesToScan |Comma separated list of docker image names or hashes to execute container scanning on | ubuntu:16.04,56bab49eef2ef07505f6a1b0d5bd3a601dfc3c76ad4460f24c91d6fa298369ab |
3663
detectorsFilter | A comma separated list with the identifiers of the specific detectors to be used. | `Pip, RustCrateDetector`
3764
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. | `NuGet,Npm`

0 commit comments

Comments
 (0)