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
` ` `
@@ -295,7 +295,7 @@ Example
295
295
Example :
296
296
297
297
` ` ` yaml
298
-
298
+
299
299
with:
300
300
internal-be-careful-debug: true
301
301
` ` `
@@ -309,7 +309,7 @@ to `pip-audit`.
309
309
Example :
310
310
311
311
` ` ` yaml
312
-
312
+
313
313
with:
314
314
internal-be-careful-extra-flags: --not-a-real-pip-audit-flag
315
315
` ` `
@@ -326,7 +326,7 @@ If you're auditing a requirements file, consider setting `no-deps: true` or
326
326
`require-hashes : true`:
327
327
328
328
` ` ` yaml
329
-
329
+
330
330
with:
331
331
inputs: requirements.txt
332
332
require-hashes: true
@@ -335,7 +335,7 @@ If you're auditing a requirements file, consider setting `no-deps: true` or
335
335
or :
336
336
337
337
` ` ` yaml
338
-
338
+
339
339
with:
340
340
inputs: requirements.txt
341
341
no-deps: true
@@ -356,7 +356,7 @@ by the host system itself, or other Python projects that happen to be installed.
356
356
To minimize external dependencies, you can opt into a virtual environment :
357
357
358
358
` ` ` yaml
359
-
359
+
360
360
with:
361
361
# must be populated earlier in the CI
362
362
virtual-environment: env/
@@ -366,7 +366,7 @@ and, more aggressively, specify that only dependencies marked as "local"
366
366
in the virtual environment should be included :
367
367
368
368
` ` ` yaml
369
-
369
+
370
370
with:
371
371
# must be populated earlier in the CI
372
372
virtual-environment: env/
@@ -396,7 +396,7 @@ jobs:
396
396
run: |
397
397
pipx run pipfile-requirements Pipfile.lock > requirements.txt
398
398
399
-
399
+
400
400
with:
401
401
inputs: requirements.txt
402
402
` ` `
0 commit comments