Skip to content

ci: scheduled refresh of OpenAPI specs from semgrep.dev - #2706

Merged
gaprl merged 7 commits into
mainfrom
gabriellopes/openapi-specs-refresh-workflow
Jul 22, 2026
Merged

ci: scheduled refresh of OpenAPI specs from semgrep.dev#2706
gaprl merged 7 commits into
mainfrom
gabriellopes/openapi-specs-refresh-workflow

Conversation

@gaprl

@gaprl gaprl commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Stack context

Stacked on #2703 (auto-generated API reference for v1 + v2). That PR makes Mintlify render the API docs from the checked-in specs; this one keeps those specs fresh. Merge #2703 first.

What

New workflow update-openapi-specs.yml (weekday-morning cron + manual workflow_dispatch):

  1. Fetches both specs from what semgrep-app serves in production:
  2. Mirrors x-displayName tag names into x-group (Mintlify's extension for nav group labels; skipped once upstream emits x-group natively).
  3. Runs mintlify validate against the fetched specs — a bad or partial upstream spec blocks the update instead of breaking the live docs.
  4. Opens a PR only when the specs changed (peter-evans/create-pull-request, chore/update-openapi-specs branch, auto-deleted after merge).

Actions are pinned to full commit SHAs with version comments.

Caveats

  • PRs opened with the default GITHUB_TOKEN don't trigger Docs CI on the created PR. Reviewers can close/reopen to run CI, or provide a DOCS_BOT_TOKEN secret (the workflow prefers it automatically when present).
  • The live specs currently contain validation bugs (type: bool, duplicate tags, prose in a type: field) that were patched in the checked-in copies in API reference: auto-generate from OpenAPI specs, add v1 and v2 #2703. Until they're fixed at the source in semgrep-app, the first scheduled run will fail at the validate step by design — that's the guard doing its job, not a workflow bug.

@gaprl
gaprl marked this pull request as draft July 13, 2026 19:47
Base automatically changed from gabriellopes/appex-1187-make-v2-openapi-docs-available-in-mintlify-docs to main July 14, 2026 17:06
@gaprl
gaprl marked this pull request as ready for review July 22, 2026 18:07
@gaprl
gaprl enabled auto-merge (squash) July 22, 2026 18:07
Comment thread docs/api-reference/v2/Introduction.mdx Outdated
Comment thread docs/api-reference/v2/Introduction.mdx Outdated
Comment thread docs/api-reference/v2/Introduction.mdx Outdated
Comment thread docs/api-reference/v2/Introduction.mdx Outdated
gaprl and others added 4 commits July 22, 2026 11:58
Co-authored-by: Abhijna Parigi <abhijna@semgrep.com>
Co-authored-by: Abhijna Parigi <abhijna@semgrep.com>
Co-authored-by: Abhijna Parigi <abhijna@semgrep.com>
Co-authored-by: Abhijna Parigi <abhijna@semgrep.com>
@mintlify

mintlify Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
semgrep-docs 🟢 Ready View Preview Jul 22, 2026, 6:59 PM

@gaprl
gaprl merged commit f0d69e3 into main Jul 22, 2026
3 of 4 checks passed
@gaprl
gaprl deleted the gabriellopes/openapi-specs-refresh-workflow branch July 22, 2026 18:59
@semgrep-zcs-prod-semgrep

Copy link
Copy Markdown
Contributor

Semgrep found 1 generic_bearer_auth_header finding:

Hardcoded sensitive data leaked

Semgrep has detected a leak of sensitive data in this code. This secret data could be used by internal or external malicious actors. We highly recommend you change, reset, or rotate the sensitive data.

A secret is hard-coded in the application. Secrets stored in source code, such as credentials, identifiers, and other types of sensitive data, can be leaked and used by internal or external malicious actors. It is recommended to rotate the secret and retrieve them from a secure secret vault or Hardware Security Module (HSM), alternatively environment variables can be used if allowed by your company policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants