32
32
- uses : actions/checkout@v3
33
33
- name : install
34
34
run : python -m pip install .
35
-
35
+
36
36
` ` `
37
37
38
38
Or, with a virtual environment:
48
48
python -m venv env/
49
49
source env/bin/activate
50
50
python -m pip install .
51
-
51
+
52
52
with :
53
53
virtual-environment : env/
54
54
` ` `
@@ -72,15 +72,15 @@ The `inputs` setting controls what sources `pip-audit` runs on.
72
72
To audit one or more requirements-style inputs :
73
73
74
74
` ` ` yaml
75
-
75
+
76
76
with:
77
77
inputs: requirements.txt dev-requirements.txt
78
78
` ` `
79
79
80
80
To audit a project that uses `pyproject.toml` for its dependencies :
81
81
82
82
` ` ` yaml
83
-
83
+
84
84
with:
85
85
# NOTE: this can be ` .`, for the current directory
86
86
inputs : path/to/project/
@@ -108,7 +108,7 @@ Example: use the virtual environment specified at `env/`, relative to the
108
108
current directory :
109
109
110
110
` ` ` yaml
111
-
111
+
112
112
with:
113
113
virtual-environment: env/
114
114
# Note the absence of ` input:`, since we're auditing the environment.
@@ -128,7 +128,7 @@ installed directly into the current environment are included.
128
128
Example:
129
129
130
130
``` yaml
131
-
131
+
132
132
with :
133
133
local : true
134
134
` ` `
@@ -145,7 +145,7 @@ It's directly equivalent to `pip-audit --vulnerability-service=...`.
145
145
To audit with OSV instead of PyPI :
146
146
147
147
` ` ` yaml
148
-
148
+
149
149
with:
150
150
vulnerability-service: osv
151
151
` ` `
@@ -160,7 +160,7 @@ It's directly equivalent to `pip-audit --require-hashes ...`.
160
160
Example :
161
161
162
162
` ` ` yaml
163
-
163
+
164
164
with:
165
165
# NOTE: only works with requirements-style inputs
166
166
inputs: requirements.txt
@@ -177,7 +177,7 @@ It's directly equivalent to `pip-audit --no-deps ...`.
177
177
Example :
178
178
179
179
` ` ` yaml
180
-
180
+
181
181
with:
182
182
# NOTE: only works with requirements-style inputs
183
183
inputs: requirements.txt
@@ -195,7 +195,7 @@ is rendered at the end of the action.
195
195
Example :
196
196
197
197
` ` ` yaml
198
-
198
+
199
199
with:
200
200
summary: false
201
201
` ` `
@@ -214,7 +214,7 @@ indices to search (such as a corporate index with private packages), see
214
214
Example :
215
215
216
216
` ` ` yaml
217
-
217
+
218
218
with:
219
219
index-url: https://example.corporate.local/simple
220
220
` ` `
@@ -229,7 +229,7 @@ indexes to search when resolving dependencies. Each URL is whitespace-separated.
229
229
Example :
230
230
231
231
` ` ` yaml
232
-
232
+
233
233
with:
234
234
extra-index-urls: |
235
235
https://example.corporate.local/simple
@@ -246,7 +246,7 @@ ignore (i.e., exclude from the results) if present. Each ID is whitespace-separa
246
246
Example
247
247
248
248
` ` ` yaml
249
-
249
+
250
250
with:
251
251
ignore-vulns: |
252
252
GHSA-XXXX-YYYYYY
@@ -276,7 +276,7 @@ Example
276
276
Example :
277
277
278
278
` ` ` yaml
279
-
279
+
280
280
with:
281
281
internal-be-careful-allow-failure: true
282
282
` ` `
@@ -290,7 +290,7 @@ to `pip-audit`.
290
290
Example :
291
291
292
292
` ` ` yaml
293
-
293
+
294
294
with:
295
295
internal-be-careful-extra-flags: --not-a-real-pip-audit-flag
296
296
` ` `
@@ -307,7 +307,7 @@ If you're auditing a requirements file, consider setting `no-deps: true` or
307
307
`require-hashes : true`:
308
308
309
309
` ` ` yaml
310
-
310
+
311
311
with:
312
312
inputs: requirements.txt
313
313
require-hashes: true
@@ -316,7 +316,7 @@ If you're auditing a requirements file, consider setting `no-deps: true` or
316
316
or :
317
317
318
318
` ` ` yaml
319
-
319
+
320
320
with:
321
321
inputs: requirements.txt
322
322
no-deps: true
@@ -337,7 +337,7 @@ by the host system itself, or other Python projects that happen to be installed.
337
337
To minimize external dependencies, you can opt into a virtual environment :
338
338
339
339
` ` ` yaml
340
-
340
+
341
341
with:
342
342
# must be populated earlier in the CI
343
343
virtual-environment: env/
@@ -347,7 +347,7 @@ and, more aggressively, specify that only dependencies marked as "local"
347
347
in the virtual environment should be included :
348
348
349
349
` ` ` yaml
350
-
350
+
351
351
with:
352
352
# must be populated earlier in the CI
353
353
virtual-environment: env/
@@ -383,7 +383,7 @@ jobs:
383
383
run: |
384
384
pipx run pipfile-requirements Pipfile.lock > requirements.txt
385
385
386
-
386
+
387
387
with:
388
388
inputs: requirements.txt
389
389
` ` `
0 commit comments