← Files DaybreakARCHIVED FILE
skills/codex-security-cloud/SKILL.md
10.3 KB · Dec 3, 2026 · 18:17 UTC
--- name: codex-security-cloud description: Use Daybreak Defense Factory (also called Daybreak or Codex Security Cloud) to set up a repository scan, show the Daybreak overview, or list security findings. Also use it to launch, inspect, or cancel cloud scans and configure continuous monitoring. --- # Daybreak Defense Factory “Daybreak”, “Daybreak Defense Factory”, and “Codex Security Cloud” refer to this same plugin. Use the existing `defense_factory_*` tools for all three names. Use the connected Daybreak tools directly for chat requests such as "Scan owner/repo", "How is my scan doing?", "Summarize its findings", or "Cancel that scan". Discover the relevant `defense_factory_*` tools through tool search when needed. A clear request to launch or cancel authorizes that action; do not ask for a duplicate confirmation. ## Check setup before using data tools If the user or active page supplies an exact native canonical finding ID, read the finding or its latest saved fix directly using the tools below. These readers check access for the signed-in account and repository. For other requests to list or read scans, findings, repositories, environments, or usage, or to launch a scan, call `defense_factory_bootstrap` for the active account. Reuse its result within the current request and check again after the account changes or the user completes connection setup. - If access is denied or workflows are disabled, explain the returned setup requirement and use the active app for setup, opening it if needed. Do not continue with data tools. - If `githubConnected` is false or `githubConnectorIds` is an empty list, explain that GitHub must be connected in this workspace and use the active app for setup, calling `open_defense_factory` only if it is not already active. Stop data calls until the user has connected GitHub, then check bootstrap again. - Null connection state means discovery was unavailable, not that GitHub is disconnected. Existing reads may still be authorized; do not treat this as a confirmed missing connection. - If a data tool returns `no_github_connection`, stop further data calls and use the same connection setup flow. Do not retry it as a service outage or report that there are no scans or findings. ## Launch a scan 1. Use `githubConnectorIds` from the setup check. Pass the appropriate returned ID as `connector_id` to `defense_factory_github_search` or `defense_factory_github_repositories`; search the active connections when the target's connector is unknown. Use `defense_factory_github_get` for an already known repository ID. Preserve returned repository IDs and connector identity, including GitHub Enterprise namespaces. 2. Find environments for the repository and GitHub connection with `defense_factory_environments_list` or `defense_factory_environments_search`. If the user named an environment you can't find, ask how to proceed. - If one matches, pass its `environment_id`. - If several match, use the user's choice or ask which one to use. - If none match, pass `repo_connector_id` and omit `environment_id`. Daybreak checks again at launch and creates an environment if needed. It shares the new environment with the workspace and turns off agent network access. If the connector still requires an environment ID, guide the user through the first scan in the app. 3. Read `defense_factory_workflow_definition` for workflow ID `codex-security.security-scan`. Build launch `steps` using its returned step IDs and model/reasoning options. Use the user's supported selections or a sole returned option; ask for unresolved choices instead of inventing defaults. Omit `reasoning` when the step does not offer it. Use `defense_factory_usage_get` when scan availability or credits matter; backend launch checks still decide admission. 4. Call `defense_factory_workflow_launch` with those selections and one idempotency key for this launch attempt. Preserve the same key and inputs when retrying an ambiguous response; changing the key could start another paid scan. Report a conflict or unresolved failure instead of creating a replacement launch. 5. Return the run ID, repository, target revision, and reported status. `queued` confirms acceptance and `running` means work is in progress. Report successful completion only for `completed`. Report `failed` with the returned failure details, and report `canceled` as cancellation, not success. ## Inspect results or cancel For a general list of security findings, use `defense_factory_canonical_findings_list` after the setup check. List the findings visible in the current workspace in chat and say when there are more results. Use `defense_factory_workflow_list` and `defense_factory_workflow_repositories` to find runs, and `defense_factory_workflow_get` for the exact run's status and output IDs. Read output metadata and artifact references with `defense_factory_workflow_output`. For repository-scan findings, use `defense_factory_findings_list` with `source: repository_scan` and `scan_id` set to the run ID; follow pagination before claiming a complete summary. Report artifacts are downloaded through the app; their references alone do not contain the report contents. Summarize the findings actually read, preserve any output-validation warnings, and include the relevant run/output IDs. For cancellation, resolve the requested run and call `defense_factory_workflow_cancel`. Report its returned state accurately: `cancel_requested` means cancellation is pending; only `canceled` confirms completion. If the run already finished, report that state. Use `defense_factory_canonical_findings_get` with `parameters.path.finding_id` for a native canonical finding. Use `defense_factory_findings_list` and `defense_factory_findings_get` for original findings across scan types. For an imported report, use `defense_factory_findings_get` with `parameters.query.api_version` set to `"v2"` and `parameters.query.view` set to `"report"`, as the page does. When asked to close a fixed commit-scan finding, read its combined `commit:<id>` first, then pass `commit_detail.id`, the current `commit_detail.version`, and a written resolution reason to `defense_factory_findings_close`. Repository-scan and PR-review observations do not support that close operation. Preserve the distinction between a finding and a workflow run. Link each finding title using its returned ID: `https://chatgpt.com/mcp-app/connector_openai_defense_factory/open_defense_factory#/findings/<id>`. For original findings (IDs without the `acf_` prefix), use `#/findings/raw/<id>` instead. Percent-encode the entire ID as one path segment; for example, `commit:123` becomes `commit%3A123`. Call the saved change a “fix” in replies. To check whether a fix exists or read its status, diff, or recorded checks, call `defense_factory_finding_patches_get` with the canonical ID in `parameters.path.finding_id`. For status alone, set `parameters.query.status_only` to `true`. A successful response with a null `latest_patch` means no fix has been saved. For a specifically requested revision, use `defense_factory_finding_fix_get` with the finding or fix page as `page_path` and the requested revision as `patch_id`. A request sent by the user to prepare a fix authorizes preparation for that finding. Start it in the same turn by calling `defense_factory_finding_fix` with the finding’s `page_path` and `action: "propose"`. When the user asks for the live card or chooses **Continue fix**, use `defense_factory_finding_fix_show` when the card is available. Pass `/findings/<finding_id>` as `page_path` and the saved fix ID as `patch_id`. If the user supplies only the finding ID, use `latest_patch.id` from the shared reader. The card follows the latest revision, including while queued or preparing. If the user asks about a different revision, read it with the exact revision tool. For ordinary questions about the current fix, answer from the shared reader. If the user asks for a card and it is unavailable, answer in text from the same read. Fix preparation runs in the background and can take more than ten minutes. For a queued or running fix, reply with just its current state, such as “Your fix is being prepared.” The live card tracks progress. Leave timing and troubleshooting out of routine updates. End the turn unless the user asks you to keep checking. If the latest fix failed, offer to regenerate it as a new revision. When the user asks to retry or accepts the offer, read it with `defense_factory_finding_fix_get` and follow its `regenerate_instructions` if present. If those instructions are unavailable, point the user to **Regenerate** on the fix page. When the user asks to edit a saved fix, read it with `defense_factory_finding_fix_get` and follow its `edit_instructions` if present. Otherwise explain that editing is unavailable. Report the revision and status after a successful edit. ## Read usage and spend Use `defense_factory_usage_history` for scanning spend. Pass inclusive `start_date` and `end_date` under `parameters.query`, with the user's IANA `time_zone`; use UTC and say so if their zone is unknown. Explain the calendar-only limit for rolling or intraday requests. Sum recorded costs across the returned buckets, keeping billable amounts, allowances, and exemptions distinct. Include the returned interval and `as_of`; disclose pending usage or billing as incomplete. These receipts are not a final invoice. `defense_factory_usage_get` reports current allowance, not historical spend. If history is unavailable, report that instead of summing cumulative scan totals or falling back to browser automation. ## Open the app or finish setup Treat requests to show the Daybreak overview or set up a repository scan as requests to use the app. For scan setup, guide the user to **New Scan** or **Scan with our cyber models** during first-time setup. Only launch a scan when the user asks to run it. When Daybreak is already active, use its current context and tools without calling `open_defense_factory` again. For setup or actions available only in the app, direct the user to its existing controls. If the app is closed, call `open_defense_factory` when the user asks to open it or needs a feature only the app offers. These include connecting GitHub, customizing a Cloud environment, managing continuous monitoring and editing some findings. Tell the user which control to use. Do not ask for credentials or change workspace permissions. Only start a scan or make a change if the user asks.
SHA-256: d1f182210b73a0fc886a2766153de086b87aaa58fcc04429c59bb6fa5066a401