# How to run your first Codex Security scan

## Executive summary

This guide demonstrates the end-to-end process of using Codex Security to identify, analyze, and patch security vulnerabilities within a codebase. The process begins by installing the Codex Security plugin and running a deep scan, which allows users to provide additional context to the model (e.g., focusing on an authentication service). Once vulnerabilities are found, fixes can be generated and published directly to GitHub. For scaling, the Codex Security CLI is introduced, enabling the embedding of these security testing capabilities into CI/CD pipelines and automation workflows.

## Key takeaways

- Initial Setup and Access: Before scanning, ensure access to Daybreak Blue is configured. The Codex Security plugin must be installed within the Codex environment.
- Deep Scanning and Contextual Analysis: To maximize accuracy, when initiating a scan, select the target repository, choose the model (e.g., Daybreak Blue), and enable additional context. Providing specific guidance (e.g., focusing on the authentication service) directs the model to perform a more precise analysis.
- Scaling Security Analysis with CLI: While the plugin handles local scans, the Codex Security CLI must be used to scale security analysis across multiple repositories and embed the process into CI/CD infrastructure. The CLI is installed via `npm install`.

## Technical details

- Codex Security Plugin Workflow: The plugin allows users to initiate a scan, which involves preparing the scan by understanding the codebase, building a threat model, and identifying candidate findings. Vulnerabilities are presented with a summary, attack path, and additional evidence. Fixes can be generated using the 'fix finding skill' and published as a Pull Request (PR) directly to GitHub.
- Codex Security CLI Implementation: The CLI provides a portable method to run the same set of steps (scan, review, triage) outside of the GUI plugin. Installation is straightforward using `npm install`. This portability is key for embedding security checks into automated CI/CD processes.

## Practical implications

- Security testing can be shifted left by integrating vulnerability scanning directly into the CI/CD pipeline.
- The use of additional context allows build engineers to guide the AI model, ensuring the analysis focuses on critical application components (e.g., authentication services).
- The CLI provides a repeatable, scriptable method for security analysis, moving beyond manual, single-repository scans.

## Topics

Security Scanning, CI/CD, AI-Assisted Code Review, Build Automation, Codex Security, Daybreak Blue, Codex Security CLI, npm

Source: https://www.youtube.com/watch?v=hUhr0JiVZZs
