mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-12 14:59:01 +00:00
Update cheatsheets
This commit is contained in:
30
tldr/composer-audit
Normal file
30
tldr/composer-audit
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# composer audit
|
||||
|
||||
> Analyze a PHP project's dependencies to detect known security vulnerabilities and list affected packages.
|
||||
> See also: `composer`.
|
||||
> More information: <https://getcomposer.org/doc/03-cli.md#audit>.
|
||||
|
||||
- Check for security vulnerabilities in your current project:
|
||||
|
||||
`composer audit`
|
||||
|
||||
- Omit dev dependencies in the audit:
|
||||
|
||||
`composer audit --no-dev`
|
||||
|
||||
- Filter vulnerabilities by output format:
|
||||
|
||||
`composer audit --format {{table|plain|json|summary}}`
|
||||
|
||||
- Output audit results to a file in JSON format:
|
||||
|
||||
`composer audit --format json > audit_report.json`
|
||||
|
||||
- Verify whether a specific package in your project is affected by security issues:
|
||||
|
||||
`composer audit {{vendor}}/{{package}}`
|
||||
Reference in New Issue
Block a user