> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/application-security/code-security/code-security-scanners/malicious-packages/cli-workflow.md).

# CLI workflow

#### Shift-left context

The Cortex CLI runs malicious package detection during CI scans, so a CI pipeline can surface malicious dependencies before an artifact is built or deployed. Malicious package detection is gated by the same feature flag as the other channels.

#### Review malicious package detection in the CLI

During a CI scan, the CLI prints a per-file **Malicious Packages** summary table alongside the existing CVE table. The table includes the columns **Package** (`<name>@<version>`), **Malware ID** (for example, `MAL-2026-4270`), **Severity** (always `CRITICAL`), **Summary** (the OSV advisory summary, truncated), and **Advisory** (the OSV URL). Fix-version columns are omitted because OSV malicious-package entries carry no fix-version metadata — the remediation is to remove the package. Withdrawn advisories are dropped and do not appear in the table.

NOTE: When the malicious packages check cannot complete during a CLI or CI scan (service unreachable or data stale), the scan continues and produces all other findings, emits a CRITICAL-level error log, and reports the malicious packages sub-check as failed. The scan is never blocked by a malicious package check failure.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/application-security/code-security/code-security-scanners/malicious-packages/cli-workflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
