skillfullstack 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.skillsRegistry/catalog.json +231 -0
- package/AGENTS.md +89 -0
- package/README.md +210 -2
- package/bin/index.js +508 -0
- package/package.json +57 -4
- package/skills/backend/apiEngineering/SKILL.md +102 -0
- package/skills/backend/apiEngineering/evals/evalApiEngineering.py +81 -0
- package/skills/backend/apiEngineering/evals/fixtures/invalid/sampleInvalidOpenApi.json +40 -0
- package/skills/backend/apiEngineering/evals/fixtures/valid/sampleValidOpenApi.json +47 -0
- package/skills/backend/apiEngineering/policies/compatibility.md +42 -0
- package/skills/backend/apiEngineering/policies/mandatory.md +48 -0
- package/skills/backend/apiEngineering/policies/performance.md +39 -0
- package/skills/backend/apiEngineering/policies/security.md +36 -0
- package/skills/backend/apiEngineering/references/apiObservability.md +39 -0
- package/skills/backend/apiEngineering/references/apiReference.md +3 -0
- package/skills/backend/apiEngineering/references/apiSecurityOwasp.md +47 -0
- package/skills/backend/apiEngineering/references/contractCompatibility.md +26 -0
- package/skills/backend/apiEngineering/references/databaseTransactions.md +40 -0
- package/skills/backend/apiEngineering/references/distributedReliability.md +26 -0
- package/skills/backend/apiEngineering/references/multiTenancy.md +27 -0
- package/skills/backend/apiEngineering/references/openApi32Standards.md +58 -0
- package/skills/backend/apiEngineering/references/paginationVersioning.md +57 -0
- package/skills/backend/apiEngineering/references/responseStandards.md +94 -0
- package/skills/backend/apiEngineering/scripts/auditApiContract.py +123 -0
- package/skills/backend/apiEngineering/scripts/checkBreakingChanges.py +77 -0
- package/skills/backend/apiEngineering/scripts/generateResponseEnvelope.py +88 -0
- package/skills/backend/apiEngineering/templates/apiChecklist.md +27 -0
- package/skills/backend/apiEngineering/templates/openapi.yaml +125 -0
- package/skills/backend/apiEngineering/templates/problemDetails.json +44 -0
- package/skills/backend/databaseArchitecture/SKILL.md +118 -0
- package/skills/backend/databaseArchitecture/evals/evalDatabaseArchitecture.py +85 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/dangerousMigration.sql +4 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/invalidSchema.sql +23 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/safeMigration.sql +3 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/validSchema.sql +37 -0
- package/skills/backend/databaseArchitecture/policies/integrity.md +25 -0
- package/skills/backend/databaseArchitecture/policies/mandatory.md +32 -0
- package/skills/backend/databaseArchitecture/policies/migration.md +22 -0
- package/skills/backend/databaseArchitecture/policies/normalization.md +25 -0
- package/skills/backend/databaseArchitecture/policies/performance.md +26 -0
- package/skills/backend/databaseArchitecture/policies/recovery.md +23 -0
- package/skills/backend/databaseArchitecture/policies/security.md +26 -0
- package/skills/backend/databaseArchitecture/policies/tableCreationChecklist.md +70 -0
- package/skills/backend/databaseArchitecture/references/analyticsWarehousing.md +32 -0
- package/skills/backend/databaseArchitecture/references/apiReference.md +3 -0
- package/skills/backend/databaseArchitecture/references/backupDisasterRecovery.md +27 -0
- package/skills/backend/databaseArchitecture/references/dataModelingLifecycle.md +30 -0
- package/skills/backend/databaseArchitecture/references/databaseTaxonomy.md +32 -0
- package/skills/backend/databaseArchitecture/references/indexingOptimization.md +32 -0
- package/skills/backend/databaseArchitecture/references/normalizationTheory.md +61 -0
- package/skills/backend/databaseArchitecture/references/scalabilitySharding.md +37 -0
- package/skills/backend/databaseArchitecture/references/transactionConcurrency.md +39 -0
- package/skills/backend/databaseArchitecture/scripts/analyzeMigration.py +99 -0
- package/skills/backend/databaseArchitecture/scripts/auditDatabaseSchema.py +177 -0
- package/skills/backend/databaseArchitecture/scripts/inspectDatabaseIndexes.py +149 -0
- package/skills/backend/databaseArchitecture/templates/adrTemplate.md +32 -0
- package/skills/backend/databaseArchitecture/templates/databaseChecklist.md +29 -0
- package/skills/backend/databaseArchitecture/templates/migrationPlan.md +40 -0
- package/skills/backend/durableBackgroundJobs/SKILL.md +112 -0
- package/skills/backend/durableBackgroundJobs/evals/durableJobVerification.json +14 -0
- package/skills/backend/durableBackgroundJobs/references/apiReference.md +3 -0
- package/skills/backend/durableBackgroundJobs/references/durableStepPatterns.md +6 -0
- package/skills/backend/durableBackgroundJobs/references/idempotencyKeys.md +5 -0
- package/skills/backend/durableBackgroundJobs/scripts/testWorkflowDispatch.py +24 -0
- package/skills/backend/golangStandard/SKILL.md +155 -0
- package/skills/backend/golangStandard/evals/goVerification.json +14 -0
- package/skills/backend/golangStandard/references/apiReference.md +3 -0
- package/skills/backend/golangStandard/references/layoutGuide.md +26 -0
- package/skills/backend/golangStandard/references/slogPatterns.md +26 -0
- package/skills/backend/golangStandard/scripts/scaffoldGoModule.py +105 -0
- package/skills/backend/pythonStandard/SKILL.md +138 -0
- package/skills/backend/pythonStandard/evals/pythonVerification.json +14 -0
- package/skills/backend/pythonStandard/references/apiReference.md +3 -0
- package/skills/backend/pythonStandard/references/pydanticPatterns.md +16 -0
- package/skills/backend/pythonStandard/references/pyprojectSpecs.md +37 -0
- package/skills/backend/pythonStandard/scripts/scaffoldUvProject.py +79 -0
- package/skills/backend/upstash/SKILL.md +98 -0
- package/skills/backend/upstash/evals/upstashVerification.json +14 -0
- package/skills/backend/upstash/references/apiReference.md +3 -0
- package/skills/backend/upstash/references/qstashFlowControl.md +34 -0
- package/skills/backend/upstash/references/ratelimitPatterns.md +53 -0
- package/skills/backend/upstash/references/workflowPatterns.md +35 -0
- package/skills/backend/upstash/scripts/testRedisConnection.py +36 -0
- package/skills/cicdDevops/cicdPipeline/SKILL.md +148 -0
- package/skills/cicdDevops/cicdPipeline/evals/evalCicd.py +37 -0
- package/skills/cicdDevops/cicdPipeline/references/apiReference.md +3 -0
- package/skills/cicdDevops/cicdPipeline/references/cicdDeploymentPatterns.md +27 -0
- package/skills/cicdDevops/cicdPipeline/scripts/auditDockerfileSecurity.py +56 -0
- package/skills/dataAi/mcpServerDevelopment/SKILL.md +123 -0
- package/skills/dataAi/mcpServerDevelopment/evals/mcpVerification.json +14 -0
- package/skills/dataAi/mcpServerDevelopment/references/apiReference.md +3 -0
- package/skills/dataAi/mcpServerDevelopment/references/mcpClientConfigs.md +38 -0
- package/skills/dataAi/mcpServerDevelopment/references/toolSchemaDesign.md +6 -0
- package/skills/dataAi/mcpServerDevelopment/scripts/runFastMcpBoilerplate.py +36 -0
- package/skills/dataAi/ragPipelineProduction/SKILL.md +113 -0
- package/skills/dataAi/ragPipelineProduction/evals/ragVerification.json +14 -0
- package/skills/dataAi/ragPipelineProduction/references/apiReference.md +3 -0
- package/skills/dataAi/ragPipelineProduction/references/chunkingStrategies.md +10 -0
- package/skills/dataAi/ragPipelineProduction/references/rrfAlgorithm.md +13 -0
- package/skills/dataAi/ragPipelineProduction/scripts/runHybridRrfSearch.py +33 -0
- package/skills/devopsCloud/cloudflare/SKILL.md +282 -0
- package/skills/devopsCloud/cloudflare/assets/README.md +48 -0
- package/skills/devopsCloud/cloudflare/assets/ai/agents-sdk.md +118 -0
- package/skills/devopsCloud/cloudflare/assets/ai/ai-gateway.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/ai/ai-search.md +129 -0
- package/skills/devopsCloud/cloudflare/assets/ai/workers-ai.md +127 -0
- package/skills/devopsCloud/cloudflare/assets/cli/c3.md +292 -0
- package/skills/devopsCloud/cloudflare/assets/cli/cf-cli.md +90 -0
- package/skills/devopsCloud/cloudflare/assets/cli/wrangler.md +43 -0
- package/skills/devopsCloud/cloudflare/assets/compute/cron-triggers.md +486 -0
- package/skills/devopsCloud/cloudflare/assets/compute/service-bindings.md +251 -0
- package/skills/devopsCloud/cloudflare/assets/compute/smart-placement.md +435 -0
- package/skills/devopsCloud/cloudflare/assets/compute/static-assets.md +220 -0
- package/skills/devopsCloud/cloudflare/assets/compute/workers.md +129 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/d1.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/durable-objects.md +122 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/hyperdrive.md +210 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/kv.md +198 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/queues.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/r2.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/vectorize.md +97 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/workflows.md +141 -0
- package/skills/devopsCloud/cloudflare/assets/llms.txt +143 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/cache-cdn.md +109 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/dns.md +71 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/rate-limiting.md +130 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/tunnels.md +57 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/waf.md +143 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/1xxx-errors.md +209 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/5xx-errors.md +111 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/http-status-codes.md +38 -0
- package/skills/devopsCloud/cloudflare/evals/evals.json +75 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/README.md +27 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/dynamic-routing.md +15 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/features.md +22 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/sdk-integration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/troubleshooting.md +16 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/README.md +25 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/gotchas.md +13 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/bindings/README.md +16 -0
- package/skills/devopsCloud/cloudflare/references/bindings/api.md +19 -0
- package/skills/devopsCloud/cloudflare/references/bindings/configuration.md +20 -0
- package/skills/devopsCloud/cloudflare/references/bindings/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/bindings/patterns.md +20 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/README.md +18 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/api.md +12 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/configuration.md +12 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/patterns.md +12 -0
- package/skills/devopsCloud/cloudflare/references/cliComparison.md +93 -0
- package/skills/devopsCloud/cloudflare/references/containers/README.md +23 -0
- package/skills/devopsCloud/cloudflare/references/containers/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/containers/configuration.md +15 -0
- package/skills/devopsCloud/cloudflare/references/containers/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/containers/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/README.md +15 -0
- package/skills/devopsCloud/cloudflare/references/d1/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/frameworkCompatibility.md +110 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/README.md +28 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/api.md +26 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/configuration.md +34 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/gotchas.md +20 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/images/README.md +12 -0
- package/skills/devopsCloud/cloudflare/references/images/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/images/configuration.md +17 -0
- package/skills/devopsCloud/cloudflare/references/images/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/images/patterns.md +16 -0
- package/skills/devopsCloud/cloudflare/references/kv/README.md +15 -0
- package/skills/devopsCloud/cloudflare/references/kv/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/kv/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/kv/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/kv/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/patterns.md +19 -0
- package/skills/devopsCloud/cloudflare/references/observability/README.md +27 -0
- package/skills/devopsCloud/cloudflare/references/observability/api.md +20 -0
- package/skills/devopsCloud/cloudflare/references/observability/configuration.md +23 -0
- package/skills/devopsCloud/cloudflare/references/observability/gotchas.md +25 -0
- package/skills/devopsCloud/cloudflare/references/observability/patterns.md +14 -0
- package/skills/devopsCloud/cloudflare/references/pages/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/pages/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/pages/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/pages/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/pages/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/configuration.md +14 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/patterns.md +16 -0
- package/skills/devopsCloud/cloudflare/references/productSelectionMatrix.md +54 -0
- package/skills/devopsCloud/cloudflare/references/queues/README.md +24 -0
- package/skills/devopsCloud/cloudflare/references/queues/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/queues/configuration.md +20 -0
- package/skills/devopsCloud/cloudflare/references/queues/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/queues/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/r2/README.md +26 -0
- package/skills/devopsCloud/cloudflare/references/r2/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/r2/configuration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/r2/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/r2/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/api.md +21 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/configuration.md +25 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/patterns.md +27 -0
- package/skills/devopsCloud/cloudflare/references/skill-feedback.md +41 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/patterns.md +17 -0
- package/skills/devopsCloud/cloudflare/references/stream/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/stream/api-live.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/api.md +21 -0
- package/skills/devopsCloud/cloudflare/references/stream/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/patterns.md +22 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/configuration.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/api.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/configuration.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/networking.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/configuration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/patterns.md +24 -0
- package/skills/devopsCloud/cloudflare/references/waf/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/waf/api.md +17 -0
- package/skills/devopsCloud/cloudflare/references/waf/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/waf/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/waf/patterns.md +17 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/README.md +24 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/patterns.md +14 -0
- package/skills/devopsCloud/cloudflare/references/workflows/README.md +23 -0
- package/skills/devopsCloud/cloudflare/references/workflows/api.md +17 -0
- package/skills/devopsCloud/cloudflare/references/workflows/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/workflows/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/workflows/patterns.md +30 -0
- package/skills/devopsCloud/cloudflare/scripts/auditCloudflareProduction.py +95 -0
- package/skills/foundation/promptEvalTesting/SKILL.md +114 -0
- package/skills/foundation/promptEvalTesting/evals/promptEvalVerification.json +14 -0
- package/skills/foundation/promptEvalTesting/references/apiReference.md +3 -0
- package/skills/foundation/promptEvalTesting/references/evalMetricsCatalog.md +7 -0
- package/skills/foundation/promptEvalTesting/references/promptfooConfigSpecs.md +16 -0
- package/skills/foundation/promptEvalTesting/scripts/runPromptEvalSuite.py +29 -0
- package/skills/frontend/astro/SKILL.md +327 -0
- package/skills/frontend/astro/assets/README.md +71 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/content-collections.md +1061 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/data-fetching.md +109 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/images.md +719 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/markdown.md +725 -0
- package/skills/frontend/astro/assets/build-your-ui/components.md +402 -0
- package/skills/frontend/astro/assets/build-your-ui/fonts.md +437 -0
- package/skills/frontend/astro/assets/build-your-ui/front-end-frameworks.md +245 -0
- package/skills/frontend/astro/assets/build-your-ui/layouts.md +267 -0
- package/skills/frontend/astro/assets/build-your-ui/scripts-and-event-handling.md +229 -0
- package/skills/frontend/astro/assets/build-your-ui/styles-and-css.md +782 -0
- package/skills/frontend/astro/assets/build-your-ui/syntax-highlighting.md +269 -0
- package/skills/frontend/astro/assets/configuration/build-with-ai.md +389 -0
- package/skills/frontend/astro/assets/configuration/configuration-overview.md +122 -0
- package/skills/frontend/astro/assets/configuration/dev-toolbar.md +86 -0
- package/skills/frontend/astro/assets/configuration/editor-setup.md +166 -0
- package/skills/frontend/astro/assets/configuration/environment-variables.md +352 -0
- package/skills/frontend/astro/assets/configuration/typescript.md +379 -0
- package/skills/frontend/astro/assets/configuration/working-with-integrations.md +606 -0
- package/skills/frontend/astro/assets/reference/adapter-reference.md +1242 -0
- package/skills/frontend/astro/assets/reference/cli-reference.md +575 -0
- package/skills/frontend/astro/assets/reference/configuration-reference.md +3144 -0
- package/skills/frontend/astro/assets/reference/content-loader-reference.md +1682 -0
- package/skills/frontend/astro/assets/reference/directives-reference.md +324 -0
- package/skills/frontend/astro/assets/reference/image-service-reference.md +346 -0
- package/skills/frontend/astro/assets/reference/integrations-reference.md +2813 -0
- package/skills/frontend/astro/assets/reference/modules/astro-actions.md +604 -0
- package/skills/frontend/astro/assets/reference/modules/astro-app.md +460 -0
- package/skills/frontend/astro/assets/reference/modules/astro-assets.md +1657 -0
- package/skills/frontend/astro/assets/reference/modules/astro-config.md +395 -0
- package/skills/frontend/astro/assets/reference/modules/astro-content.md +720 -0
- package/skills/frontend/astro/assets/reference/modules/astro-env.md +46 -0
- package/skills/frontend/astro/assets/reference/modules/astro-fetch.md +346 -0
- package/skills/frontend/astro/assets/reference/modules/astro-hono.md +37 -0
- package/skills/frontend/astro/assets/reference/modules/astro-i18n.md +462 -0
- package/skills/frontend/astro/assets/reference/modules/astro-middleware.md +292 -0
- package/skills/frontend/astro/assets/reference/modules/astro-static-paths.md +74 -0
- package/skills/frontend/astro/assets/reference/modules/astro-transitions.md +595 -0
- package/skills/frontend/astro/assets/reference/modules/astro-zod.md +120 -0
- package/skills/frontend/astro/assets/reference/session-driver-reference.md +205 -0
- package/skills/frontend/astro/assets/routing-and-navigation/endpoints.md +251 -0
- package/skills/frontend/astro/assets/routing-and-navigation/internationalization.md +374 -0
- package/skills/frontend/astro/assets/routing-and-navigation/middleware.md +288 -0
- package/skills/frontend/astro/assets/routing-and-navigation/pages.md +205 -0
- package/skills/frontend/astro/assets/routing-and-navigation/prefetch.md +273 -0
- package/skills/frontend/astro/assets/routing-and-navigation/routing.md +760 -0
- package/skills/frontend/astro/assets/routing-and-navigation/view-transitions.md +792 -0
- package/skills/frontend/astro/assets/server-rendering/actions.md +770 -0
- package/skills/frontend/astro/assets/server-rendering/caching.md +255 -0
- package/skills/frontend/astro/assets/server-rendering/on-demand-rendering.md +289 -0
- package/skills/frontend/astro/assets/server-rendering/server-islands.md +126 -0
- package/skills/frontend/astro/assets/server-rendering/sessions.md +270 -0
- package/skills/frontend/astro/assets/start-a-new-project/develop-and-build.md +147 -0
- package/skills/frontend/astro/assets/start-a-new-project/installation.md +342 -0
- package/skills/frontend/astro/assets/start-a-new-project/project-structure.md +137 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/testing.md +412 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/troubleshooting.md +229 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/upgrade-astro.md +205 -0
- package/skills/frontend/astro/assets/welcome/courses.md +46 -0
- package/skills/frontend/astro/assets/welcome/islands-architecture.md +135 -0
- package/skills/frontend/astro/assets/welcome/why-astro.md +90 -0
- package/skills/frontend/astro/evals/evals.json +66 -0
- package/skills/frontend/astro/references/contentCollections.md +164 -0
- package/skills/frontend/astro/references/islandsArchitecture.md +128 -0
- package/skills/frontend/astro/references/serverIslandsAndActions.md +187 -0
- package/skills/frontend/astro/scripts/auditAstroProduction.py +78 -0
- package/skills/frontend/generativeUi/SKILL.md +128 -0
- package/skills/frontend/generativeUi/evals/generativeUiVerification.json +14 -0
- package/skills/frontend/generativeUi/references/apiReference.md +3 -0
- package/skills/frontend/generativeUi/references/clientToolComponentMapping.md +8 -0
- package/skills/frontend/generativeUi/references/dataStreamProtocol.md +10 -0
- package/skills/frontend/generativeUi/scripts/generateUiComponentStub.py +46 -0
- package/skills/frontend/nextjs/SKILL.md +138 -0
- package/skills/frontend/nextjs/assets/README.md +67 -0
- package/skills/frontend/nextjs/assets/api-reference/cli/create-next-app.md +210 -0
- package/skills/frontend/nextjs/assets/api-reference/cli/next.md +484 -0
- package/skills/frontend/nextjs/assets/api-reference/components/font.md +952 -0
- package/skills/frontend/nextjs/assets/api-reference/components/form.md +387 -0
- package/skills/frontend/nextjs/assets/api-reference/components/image.md +1372 -0
- package/skills/frontend/nextjs/assets/api-reference/components/link.md +954 -0
- package/skills/frontend/nextjs/assets/api-reference/components/script.md +421 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache-private.md +211 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache-remote.md +652 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache.md +848 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-client.md +149 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-server.md +234 -0
- package/skills/frontend/nextjs/assets/api-reference/edge-runtime.md +188 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/default.md +80 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/dynamic-routes.md +417 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/error.md +361 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/forbidden.md +75 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/instrumentation-client.md +308 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/instrumentation.md +177 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/intercepting-routes.md +78 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/layout.md +803 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/loading.md +209 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/mdx-components.md +84 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/app-icons.md +302 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/manifest.md +90 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/opengraph-image.md +580 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/robots.md +234 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/sitemap.md +459 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/not-found.md +278 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/page.md +283 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/parallel-routes.md +517 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/proxy.md +857 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/public-folder.md +47 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-groups.md +40 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/dynamicParams.md +40 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/ensureStatic.md +195 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/instant.md +204 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/maxDuration.md +42 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/preferredRegion.md +55 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/prefetch.md +113 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/runtime.md +43 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route.md +772 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/src-folder.md +42 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/template.md +174 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/unauthorized.md +143 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/after.md +332 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cacheLife.md +642 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cacheTag.md +272 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/catchError.md +267 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/connection.md +114 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cookies.md +349 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/draft-mode.md +173 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/fetch.md +141 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/forbidden.md +327 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-image-metadata.md +311 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-metadata.md +1510 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-sitemaps.md +102 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-static-params.md +606 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-viewport.md +347 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/headers.md +92 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/image-response.md +225 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/io.md +131 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/navigation.md +220 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-request.md +116 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-response.md +219 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-root-params.md +479 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/not-found.md +269 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/permanentRedirect.md +92 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/prefetch.md +202 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/redirect.md +255 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/refresh.md +91 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/revalidatePath.md +248 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/revalidateTag.md +175 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unauthorized.md +389 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_cache.md +131 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_noStore.md +61 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_rethrow.md +79 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/updateTag.md +173 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-link-status.md +268 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-offline.md +222 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-params.md +102 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-pathname.md +189 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-report-web-vitals.md +175 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-router.md +214 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-search-params.md +416 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-selected-layout-segment.md +214 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-selected-layout-segments.md +116 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-server-inserted-html.md +145 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/userAgent.md +95 -0
- package/skills/frontend/nextjs/assets/api-reference/turbopack.md +552 -0
- package/skills/frontend/nextjs/assets/architecture/accessibility.md +47 -0
- package/skills/frontend/nextjs/assets/architecture/fast-refresh.md +122 -0
- package/skills/frontend/nextjs/assets/architecture/nextjs-compiler.md +376 -0
- package/skills/frontend/nextjs/assets/architecture/supported-browsers.md +146 -0
- package/skills/frontend/nextjs/assets/community/contribution-guide.md +459 -0
- package/skills/frontend/nextjs/assets/community/rspack.md +25 -0
- package/skills/frontend/nextjs/assets/getting-started/caching.md +626 -0
- package/skills/frontend/nextjs/assets/getting-started/css.md +336 -0
- package/skills/frontend/nextjs/assets/getting-started/deploying.md +115 -0
- package/skills/frontend/nextjs/assets/getting-started/error-handling.md +485 -0
- package/skills/frontend/nextjs/assets/getting-started/fetching-data.md +743 -0
- package/skills/frontend/nextjs/assets/getting-started/fonts.md +232 -0
- package/skills/frontend/nextjs/assets/getting-started/images.md +272 -0
- package/skills/frontend/nextjs/assets/getting-started/installation.md +446 -0
- package/skills/frontend/nextjs/assets/getting-started/layouts-and-pages.md +386 -0
- package/skills/frontend/nextjs/assets/getting-started/linking-and-navigating.md +475 -0
- package/skills/frontend/nextjs/assets/getting-started/metadata-and-og-images.md +370 -0
- package/skills/frontend/nextjs/assets/getting-started/mutating-data.md +679 -0
- package/skills/frontend/nextjs/assets/getting-started/project-structure.md +290 -0
- package/skills/frontend/nextjs/assets/getting-started/proxy.md +107 -0
- package/skills/frontend/nextjs/assets/getting-started/revalidating.md +241 -0
- package/skills/frontend/nextjs/assets/getting-started/route-handlers.md +233 -0
- package/skills/frontend/nextjs/assets/getting-started/server-and-client-components.md +683 -0
- package/skills/frontend/nextjs/assets/getting-started/upgrading.md +137 -0
- package/skills/frontend/nextjs/assets/glossary.md +315 -0
- package/skills/frontend/nextjs/evals/nextjsVerification.json +14 -0
- package/skills/frontend/nextjs/references/apiReference.md +3 -0
- package/skills/frontend/nextjs/references/dataAccessLayer.md +39 -0
- package/skills/frontend/nextjs/references/nextjsFeatureMap.md +276 -0
- package/skills/frontend/nextjs/references/productionChecklist.md +49 -0
- package/skills/frontend/nextjs/references/securityHeadersCsp.md +44 -0
- package/skills/frontend/nextjs/scripts/auditProductionReadiness.py +85 -0
- package/skills/frontend/shadcn-ui/SKILL.md +102 -0
- package/skills/frontend/shadcn-ui/assets/README.md +82 -0
- package/skills/frontend/shadcn-ui/assets/advanced/javascript.md +44 -0
- package/skills/frontend/shadcn-ui/assets/advanced/monorepo.md +254 -0
- package/skills/frontend/shadcn-ui/assets/advanced/react-19.md +166 -0
- package/skills/frontend/shadcn-ui/assets/advanced/tailwind-v4.md +333 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/chain-of-thought.md +519 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/chat.md +581 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/checkpoint.md +243 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/confirmation.md +382 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/context.md +188 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/file-tree.md +248 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/index.md +307 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/inline-citation.md +219 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/message.md +298 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/model-selector.md +368 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/plan.md +398 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/prompt-input.md +403 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/queue.md +517 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/reasoning.md +349 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/sources.md +303 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/stack-trace.md +514 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/subagent.md +551 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/suggestion.md +246 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/task.md +380 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/terminal.md +463 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/test-results.md +641 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/tool.md +915 -0
- package/skills/frontend/shadcn-ui/assets/components/accordion.md +490 -0
- package/skills/frontend/shadcn-ui/assets/components/alert-dialog.md +520 -0
- package/skills/frontend/shadcn-ui/assets/components/alert.md +351 -0
- package/skills/frontend/shadcn-ui/assets/components/aspect-ratio.md +206 -0
- package/skills/frontend/shadcn-ui/assets/components/attachment.md +715 -0
- package/skills/frontend/shadcn-ui/assets/components/avatar.md +581 -0
- package/skills/frontend/shadcn-ui/assets/components/badge.md +276 -0
- package/skills/frontend/shadcn-ui/assets/components/breadcrumb.md +556 -0
- package/skills/frontend/shadcn-ui/assets/components/bubble.md +706 -0
- package/skills/frontend/shadcn-ui/assets/components/button-group.md +969 -0
- package/skills/frontend/shadcn-ui/assets/components/button.md +523 -0
- package/skills/frontend/shadcn-ui/assets/components/calendar.md +959 -0
- package/skills/frontend/shadcn-ui/assets/components/card.md +684 -0
- package/skills/frontend/shadcn-ui/assets/components/carousel.md +643 -0
- package/skills/frontend/shadcn-ui/assets/components/chart.md +1295 -0
- package/skills/frontend/shadcn-ui/assets/components/checkbox.md +553 -0
- package/skills/frontend/shadcn-ui/assets/components/code-block.md +2041 -0
- package/skills/frontend/shadcn-ui/assets/components/collapsible.md +504 -0
- package/skills/frontend/shadcn-ui/assets/components/combobox.md +1102 -0
- package/skills/frontend/shadcn-ui/assets/components/command.md +682 -0
- package/skills/frontend/shadcn-ui/assets/components/context-menu.md +949 -0
- package/skills/frontend/shadcn-ui/assets/components/data-table.md +1667 -0
- package/skills/frontend/shadcn-ui/assets/components/date-picker.md +698 -0
- package/skills/frontend/shadcn-ui/assets/components/dialog.md +454 -0
- package/skills/frontend/shadcn-ui/assets/components/direction.md +205 -0
- package/skills/frontend/shadcn-ui/assets/components/drawer.md +806 -0
- package/skills/frontend/shadcn-ui/assets/components/dropdown-menu.md +1315 -0
- package/skills/frontend/shadcn-ui/assets/components/empty.md +562 -0
- package/skills/frontend/shadcn-ui/assets/components/field.md +1321 -0
- package/skills/frontend/shadcn-ui/assets/components/hover-card.md +342 -0
- package/skills/frontend/shadcn-ui/assets/components/index.md +82 -0
- package/skills/frontend/shadcn-ui/assets/components/input-group.md +980 -0
- package/skills/frontend/shadcn-ui/assets/components/input-otp.md +551 -0
- package/skills/frontend/shadcn-ui/assets/components/input.md +555 -0
- package/skills/frontend/shadcn-ui/assets/components/item.md +937 -0
- package/skills/frontend/shadcn-ui/assets/components/kbd.md +290 -0
- package/skills/frontend/shadcn-ui/assets/components/label.md +327 -0
- package/skills/frontend/shadcn-ui/assets/components/marker.md +445 -0
- package/skills/frontend/shadcn-ui/assets/components/menubar.md +804 -0
- package/skills/frontend/shadcn-ui/assets/components/message-scroller.md +2770 -0
- package/skills/frontend/shadcn-ui/assets/components/message.md +618 -0
- package/skills/frontend/shadcn-ui/assets/components/native-select.md +321 -0
- package/skills/frontend/shadcn-ui/assets/components/navigation-menu.md +568 -0
- package/skills/frontend/shadcn-ui/assets/components/pagination.md +425 -0
- package/skills/frontend/shadcn-ui/assets/components/popover.md +402 -0
- package/skills/frontend/shadcn-ui/assets/components/progress.md +240 -0
- package/skills/frontend/shadcn-ui/assets/components/questionnaire.md +2055 -0
- package/skills/frontend/shadcn-ui/assets/components/radio-group.md +440 -0
- package/skills/frontend/shadcn-ui/assets/components/resizable.md +302 -0
- package/skills/frontend/shadcn-ui/assets/components/scroll-area.md +226 -0
- package/skills/frontend/shadcn-ui/assets/components/select.md +647 -0
- package/skills/frontend/shadcn-ui/assets/components/separator.md +235 -0
- package/skills/frontend/shadcn-ui/assets/components/sheet.md +354 -0
- package/skills/frontend/shadcn-ui/assets/components/sidebar.md +1156 -0
- package/skills/frontend/shadcn-ui/assets/components/skeleton.md +217 -0
- package/skills/frontend/shadcn-ui/assets/components/slider.md +253 -0
- package/skills/frontend/shadcn-ui/assets/components/spinner.md +352 -0
- package/skills/frontend/shadcn-ui/assets/components/switch.md +296 -0
- package/skills/frontend/shadcn-ui/assets/components/table.md +572 -0
- package/skills/frontend/shadcn-ui/assets/components/tabs.md +425 -0
- package/skills/frontend/shadcn-ui/assets/components/textarea.md +218 -0
- package/skills/frontend/shadcn-ui/assets/components/toast.md +260 -0
- package/skills/frontend/shadcn-ui/assets/components/toggle-group.md +419 -0
- package/skills/frontend/shadcn-ui/assets/components/toggle.md +220 -0
- package/skills/frontend/shadcn-ui/assets/components/tooltip.md +332 -0
- package/skills/frontend/shadcn-ui/assets/components/trace.md +1890 -0
- package/skills/frontend/shadcn-ui/assets/components/typography.md +561 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/next.md +108 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/overview.md +75 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/vite.md +144 -0
- package/skills/frontend/shadcn-ui/assets/forms/next.md +716 -0
- package/skills/frontend/shadcn-ui/assets/forms/overview.md +60 -0
- package/skills/frontend/shadcn-ui/assets/forms/react-hook-form.md +2055 -0
- package/skills/frontend/shadcn-ui/assets/forms/tanstack-form.md +2236 -0
- package/skills/frontend/shadcn-ui/assets/installation/astro.md +252 -0
- package/skills/frontend/shadcn-ui/assets/installation/manual.md +255 -0
- package/skills/frontend/shadcn-ui/assets/installation/next.md +256 -0
- package/skills/frontend/shadcn-ui/assets/installation/react-router.md +226 -0
- package/skills/frontend/shadcn-ui/assets/installation/remix.md +52 -0
- package/skills/frontend/shadcn-ui/assets/installation/vite.md +314 -0
- package/skills/frontend/shadcn-ui/assets/mcp/mcp.md +338 -0
- package/skills/frontend/shadcn-ui/assets/overview/changelog.md +6 -0
- package/skills/frontend/shadcn-ui/assets/overview/cli.md +738 -0
- package/skills/frontend/shadcn-ui/assets/overview/components-json.md +379 -0
- package/skills/frontend/shadcn-ui/assets/overview/directory.md +74 -0
- package/skills/frontend/shadcn-ui/assets/overview/introduction.md +77 -0
- package/skills/frontend/shadcn-ui/assets/overview/skills.md +71 -0
- package/skills/frontend/shadcn-ui/assets/overview/theming.md +304 -0
- package/skills/frontend/shadcn-ui/assets/overview/typeset.md +242 -0
- package/skills/frontend/shadcn-ui/assets/registry/getting-started.md +648 -0
- package/skills/frontend/shadcn-ui/assets/registry/overview.md +90 -0
- package/skills/frontend/shadcn-ui/assets/registry/registry-item-json.md +483 -0
- package/skills/frontend/shadcn-ui/assets/registry/registry-json.md +178 -0
- package/skills/frontend/shadcn-ui/evals/componentVerification.json +19 -0
- package/skills/frontend/shadcn-ui/references/aiComponentsCatalog.md +51 -0
- package/skills/frontend/shadcn-ui/references/apiReference.md +3 -0
- package/skills/frontend/shadcn-ui/references/blocksCatalog.md +32 -0
- package/skills/frontend/shadcn-ui/references/cliCommands.md +47 -0
- package/skills/frontend/shadcn-ui/references/componentMarkdownSources.md +48 -0
- package/skills/frontend/shadcn-ui/scripts/fetchComponentDocs.py +43 -0
- package/skills/frontend/tsxReactStandard/SKILL.md +150 -0
- package/skills/frontend/tsxReactStandard/evals/tsxVerification.json +14 -0
- package/skills/frontend/tsxReactStandard/references/apiReference.md +3 -0
- package/skills/frontend/tsxReactStandard/references/discriminatedUnions.md +31 -0
- package/skills/frontend/tsxReactStandard/references/tsconfigStrict.md +36 -0
- package/skills/frontend/tsxReactStandard/scripts/validateTsxTypes.py +44 -0
- package/skills/gitVersionControl/gitWorkflow/SKILL.md +128 -0
- package/skills/gitVersionControl/gitWorkflow/assets/README.md +23 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-environment.md +87 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-formatting.md +156 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-reference.md +2363 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/about-git.md +156 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/about-remote-repositories.md +65 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/associating-text-editors-with-git.md +93 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/caching-your-github-credentials.md +115 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/getting-changes-from-a-remote-repository.md +76 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/ignoring-files.md +51 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/managing-remote-repositories.md +231 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/pushing-commits-to-a-remote-repository.md +119 -0
- package/skills/gitVersionControl/gitWorkflow/evals/evalGitWorkflow.py +43 -0
- package/skills/gitVersionControl/gitWorkflow/references/apiReference.md +3 -0
- package/skills/gitVersionControl/gitWorkflow/references/branchingModels.md +32 -0
- package/skills/gitVersionControl/gitWorkflow/scripts/diagnoseGitGraph.py +68 -0
- package/skills/github/assets/README.md +39 -0
- package/skills/github/assets/cli/gh-environment.md +87 -0
- package/skills/github/assets/cli/gh-formatting.md +156 -0
- package/skills/github/assets/cli/gh-reference.md +2363 -0
- package/skills/github/assets/docs-api/github-docs-api.md +60 -0
- package/skills/github/assets/rest-api/actions-secrets.md +1272 -0
- package/skills/github/assets/rest-api/actions-variables.md +1247 -0
- package/skills/github/assets/rest-api/actions-workflow-runs.md +1697 -0
- package/skills/github/assets/rest-api/actions-workflows.md +348 -0
- package/skills/github/assets/rest-api/authenticating.md +174 -0
- package/skills/github/assets/rest-api/branches.md +727 -0
- package/skills/github/assets/rest-api/checks-runs.md +1013 -0
- package/skills/github/assets/rest-api/checks-suites.md +1142 -0
- package/skills/github/assets/rest-api/code-scanning.md +2957 -0
- package/skills/github/assets/rest-api/collaborators.md +547 -0
- package/skills/github/assets/rest-api/commits.md +957 -0
- package/skills/github/assets/rest-api/dependabot-alerts.md +895 -0
- package/skills/github/assets/rest-api/orgs.md +1172 -0
- package/skills/github/assets/rest-api/overview.md +875 -0
- package/skills/github/assets/rest-api/pull-reviews.md +722 -0
- package/skills/github/assets/rest-api/pulls.md +1605 -0
- package/skills/github/assets/rest-api/quickstart.md +344 -0
- package/skills/github/assets/rest-api/releases.md +650 -0
- package/skills/github/assets/rest-api/repos.md +2957 -0
- package/skills/github/assets/rest-api/rules.md +1507 -0
- package/skills/github/assets/rest-api/secret-scanning.md +947 -0
- package/skills/github/assets/rest-api/teams.md +1690 -0
- package/skills/github/githubAction/SKILL.md +159 -0
- package/skills/github/githubAction/assets/README.md +38 -0
- package/skills/github/githubAction/assets/reference/contexts.md +918 -0
- package/skills/github/githubAction/assets/reference/dependency-caching.md +393 -0
- package/skills/github/githubAction/assets/reference/events-that-trigger-workflows.md +1348 -0
- package/skills/github/githubAction/assets/reference/expressions.md +441 -0
- package/skills/github/githubAction/assets/reference/metadata-syntax.md +803 -0
- package/skills/github/githubAction/assets/reference/variables.md +149 -0
- package/skills/github/githubAction/assets/reference/workflow-cancellation.md +22 -0
- package/skills/github/githubAction/assets/reference/workflow-commands.md +1056 -0
- package/skills/github/githubAction/assets/reference/workflow-syntax.md +1721 -0
- package/skills/github/githubAction/assets/rest-api/secrets.md +1272 -0
- package/skills/github/githubAction/assets/rest-api/workflow-runs.md +1697 -0
- package/skills/github/githubAction/assets/rest-api/workflows.md +348 -0
- package/skills/github/githubAction/assets/starter-workflows/automation/stale.yml +27 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/blank.yml +36 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/docker-image.yml +18 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/go.yml +28 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/maven.yml +35 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/node.js.yml +31 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/python-app.yml +39 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/rust.yml +22 -0
- package/skills/github/githubAction/assets/starter-workflows/code-scanning/codeql.yml +97 -0
- package/skills/github/githubAction/evals/actionVerification.json +14 -0
- package/skills/github/githubAction/references/apiReference.md +3 -0
- package/skills/github/githubAction/references/workflowPatterns.md +81 -0
- package/skills/github/githubAction/scripts/validateWorkflowYaml.py +53 -0
- package/skills/github/githubQuality/SKILL.md +136 -0
- package/skills/github/githubQuality/assets/README.md +24 -0
- package/skills/github/githubQuality/assets/pull-requests/about-code-owners.md +178 -0
- package/skills/github/githubQuality/assets/pull-requests/about-merge-methods.md +48 -0
- package/skills/github/githubQuality/assets/pull-requests/creating-a-pull-request.md +170 -0
- package/skills/github/githubQuality/assets/pull-requests/giving-reviews.md +48 -0
- package/skills/github/githubQuality/assets/pull-requests/managing-a-merge-queue.md +134 -0
- package/skills/github/githubQuality/assets/pull-requests/merging-a-pull-request.md +101 -0
- package/skills/github/githubQuality/assets/pull-requests/resolving-reviews.md +59 -0
- package/skills/github/githubQuality/assets/pull-requests/status-checks.md +135 -0
- package/skills/github/githubQuality/assets/rest-api/checks-runs.md +1013 -0
- package/skills/github/githubQuality/assets/rest-api/checks-suites.md +1142 -0
- package/skills/github/githubQuality/assets/rest-api/commits.md +957 -0
- package/skills/github/githubQuality/assets/rest-api/pulls.md +1605 -0
- package/skills/github/githubQuality/assets/rest-api/reviews.md +722 -0
- package/skills/github/githubQuality/evals/qualityVerification.json +14 -0
- package/skills/github/githubQuality/references/apiReference.md +3 -0
- package/skills/github/githubQuality/references/codeownersExample.md +26 -0
- package/skills/github/githubQuality/references/prTemplate.md +20 -0
- package/skills/github/githubQuality/scripts/auditPrQuality.py +52 -0
- package/skills/github/githubSecurity/SKILL.md +170 -0
- package/skills/github/githubSecurity/assets/README.md +32 -0
- package/skills/github/githubSecurity/assets/code-scanning/code-scanning-alerts.md +133 -0
- package/skills/github/githubSecurity/assets/code-scanning/code-scanning.md +67 -0
- package/skills/github/githubSecurity/assets/code-scanning/codeql-code-scanning.md +79 -0
- package/skills/github/githubSecurity/assets/code-scanning/configure-code-scanning.md +121 -0
- package/skills/github/githubSecurity/assets/dependabot/about-the-dependabot-yml-file.md +74 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-alerts.md +133 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-security-updates.md +95 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-version-updates.md +80 -0
- package/skills/github/githubSecurity/assets/rest-api/code-scanning.md +2957 -0
- package/skills/github/githubSecurity/assets/rest-api/dependabot-alerts.md +895 -0
- package/skills/github/githubSecurity/assets/rest-api/secret-scanning.md +947 -0
- package/skills/github/githubSecurity/assets/secret-scanning/enable-secret-scanning.md +59 -0
- package/skills/github/githubSecurity/assets/secret-scanning/secret-scanning.md +105 -0
- package/skills/github/githubSecurity/assets/security-advisories/github-advisory-database.md +148 -0
- package/skills/github/githubSecurity/evals/securityVerification.json +14 -0
- package/skills/github/githubSecurity/references/apiReference.md +3 -0
- package/skills/github/githubSecurity/references/codeqlAnalysis.yml +42 -0
- package/skills/github/githubSecurity/references/dependabotConfig.yml +27 -0
- package/skills/github/githubSecurity/scripts/auditRepoSecurity.py +47 -0
- package/skills/github/githubSetup/SKILL.md +137 -0
- package/skills/github/githubSetup/assets/README.md +40 -0
- package/skills/github/githubSetup/assets/branches/about-protected-branches.md +198 -0
- package/skills/github/githubSetup/assets/branches/changing-the-default-branch.md +49 -0
- package/skills/github/githubSetup/assets/branches/deleting-and-restoring-branches.md +44 -0
- package/skills/github/githubSetup/assets/branches/managing-a-branch-protection-rule.md +115 -0
- package/skills/github/githubSetup/assets/branches/renaming-a-branch.md +74 -0
- package/skills/github/githubSetup/assets/branches/viewing-branches-in-your-repository.md +30 -0
- package/skills/github/githubSetup/assets/repositories/about-repositories.md +127 -0
- package/skills/github/githubSetup/assets/repositories/cloning-a-repository.md +114 -0
- package/skills/github/githubSetup/assets/repositories/creating-a-new-repository.md +82 -0
- package/skills/github/githubSetup/assets/repositories/creating-a-repository-from-a-template.md +51 -0
- package/skills/github/githubSetup/assets/repositories/deleting-a-repository.md +34 -0
- package/skills/github/githubSetup/assets/repositories/managing-teams-and-people-with-access.md +69 -0
- package/skills/github/githubSetup/assets/repositories/renaming-a-repository.md +47 -0
- package/skills/github/githubSetup/assets/repositories/restoring-a-deleted-repository.md +61 -0
- package/skills/github/githubSetup/assets/repositories/setting-repository-visibility.md +137 -0
- package/skills/github/githubSetup/assets/rest-api/branches.md +727 -0
- package/skills/github/githubSetup/assets/rest-api/quickstart.md +344 -0
- package/skills/github/githubSetup/assets/rest-api/repos.md +2957 -0
- package/skills/github/githubSetup/assets/rulesets/about-rulesets.md +72 -0
- package/skills/github/githubSetup/assets/rulesets/available-rules-for-rulesets.md +383 -0
- package/skills/github/githubSetup/assets/rulesets/converting-branch-protections-to-rulesets.md +92 -0
- package/skills/github/githubSetup/assets/rulesets/creating-rulesets-for-a-repository.md +108 -0
- package/skills/github/githubSetup/assets/rulesets/managing-rulesets-for-a-repository.md +149 -0
- package/skills/github/githubSetup/assets/rulesets/troubleshooting-rules.md +122 -0
- package/skills/github/githubSetup/evals/setupVerification.json +14 -0
- package/skills/github/githubSetup/references/apiReference.md +3 -0
- package/skills/github/githubSetup/references/repoSettingsBlueprint.md +13 -0
- package/skills/github/githubSetup/references/rulesetTemplates.json +42 -0
- package/skills/github/githubSetup/scripts/configureRepoBaseline.py +46 -0
- package/skills/github/githubTeam/SKILL.md +115 -0
- package/skills/github/githubTeam/assets/README.md +21 -0
- package/skills/github/githubTeam/assets/organizations/about-organizations.md +69 -0
- package/skills/github/githubTeam/assets/organizations/repository-roles-for-an-organization.md +94 -0
- package/skills/github/githubTeam/assets/rest-api/collaborators.md +547 -0
- package/skills/github/githubTeam/assets/rest-api/orgs.md +1172 -0
- package/skills/github/githubTeam/assets/rest-api/teams.md +1690 -0
- package/skills/github/githubTeam/assets/teams/about-teams.md +82 -0
- package/skills/github/githubTeam/assets/teams/adding-members-to-a-team.md +55 -0
- package/skills/github/githubTeam/evals/teamVerification.json +14 -0
- package/skills/github/githubTeam/references/apiReference.md +3 -0
- package/skills/github/githubTeam/references/permissionMatrix.md +17 -0
- package/skills/github/githubTeam/references/reviewAssignment.md +17 -0
- package/skills/github/githubTeam/scripts/manageTeamSync.py +31 -0
- package/skills/securityQa/llmSecurityRedteaming/SKILL.md +86 -0
- package/skills/securityQa/llmSecurityRedteaming/evals/securityRedteamVerification.json +14 -0
- package/skills/securityQa/llmSecurityRedteaming/references/apiReference.md +3 -0
- package/skills/securityQa/llmSecurityRedteaming/references/jailbreakTaxonomy.md +6 -0
- package/skills/securityQa/llmSecurityRedteaming/references/owaspLlmTopTen.md +12 -0
- package/skills/securityQa/llmSecurityRedteaming/scripts/testPromptInjection.py +34 -0
- package/skills/softwareDevelopment/requirementsEngineering/SKILL.md +110 -0
- package/skills/softwareDevelopment/requirementsEngineering/evals/evalRequirements.py +33 -0
- package/skills/softwareDevelopment/requirementsEngineering/references/apiReference.md +3 -0
- package/skills/softwareDevelopment/requirementsEngineering/references/requirementsAnalysisModels.md +34 -0
- package/skills/softwareDevelopment/requirementsEngineering/scripts/validateUserStories.py +49 -0
- package/skills/testing/testDrivenDevelopment/SKILL.md +122 -0
- package/skills/testing/testDrivenDevelopment/evals/evalTdd.py +25 -0
- package/skills/testing/testDrivenDevelopment/references/apiReference.md +3 -0
- package/skills/testing/testDrivenDevelopment/references/testPyramidDoubles.md +35 -0
- package/skills/testing/testDrivenDevelopment/scripts/auditTestPyramid.py +58 -0
|
@@ -0,0 +1,2957 @@
|
|
|
1
|
+
# REST API endpoints for code scanning
|
|
2
|
+
|
|
3
|
+
Use the REST API to retrieve and update code scanning alerts from a repository.
|
|
4
|
+
|
|
5
|
+
## About code scanning
|
|
6
|
+
|
|
7
|
+
You can retrieve and update code scanning alerts from a repository. You can use the endpoints to create automated reports for the code scanning alerts in an organization or upload analysis results generated using offline code scanning tools. For more information, see [Find and fix code vulnerabilities](/en/code-security/how-tos/find-and-fix-code-vulnerabilities).
|
|
8
|
+
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.
|
|
11
|
+
|
|
12
|
+
## Get the AI Scan setting for an organization
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
GET /orgs/{org}/code-scanning/ai-scan
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Gets the AI Scan setting stored on an organization.
|
|
19
|
+
The response reports the value stored on the organization. Organization respects enterprise policy.
|
|
20
|
+
The authenticated user must be an owner or security manager for the organization to use this endpoint.
|
|
21
|
+
OAuth app tokens and personal access tokens (classic) need the admin:org, repo, or write:org scope to use this endpoint. Organization owners can use admin:org or repo; security managers need write:org.
|
|
22
|
+
|
|
23
|
+
### Parameters
|
|
24
|
+
|
|
25
|
+
#### Headers
|
|
26
|
+
|
|
27
|
+
* **`accept`** (string)
|
|
28
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
29
|
+
|
|
30
|
+
#### Path and query parameters
|
|
31
|
+
|
|
32
|
+
* **`org`** (string) (required)
|
|
33
|
+
The organization name. The name is not case sensitive.
|
|
34
|
+
|
|
35
|
+
### HTTP response status codes
|
|
36
|
+
|
|
37
|
+
* **200** - OK
|
|
38
|
+
|
|
39
|
+
* **403** - Forbidden
|
|
40
|
+
|
|
41
|
+
* **404** - Resource not found
|
|
42
|
+
|
|
43
|
+
### Code examples
|
|
44
|
+
|
|
45
|
+
#### Example
|
|
46
|
+
|
|
47
|
+
**Request:**
|
|
48
|
+
|
|
49
|
+
```curl
|
|
50
|
+
curl -L \
|
|
51
|
+
-X GET \
|
|
52
|
+
https://api.github.com/orgs/ORG/code-scanning/ai-scan
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Response schema (Status: 200):**
|
|
56
|
+
|
|
57
|
+
* `pr_scan`: required, string, enum: `enabled`, `disabled`
|
|
58
|
+
* `repository_scan`: string, enum: `enabled`, `disabled`
|
|
59
|
+
|
|
60
|
+
## Update the AI Scan setting for an organization
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
PATCH /orgs/{org}/code-scanning/ai-scan
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Updates the AI Scan setting stored on an organization.
|
|
67
|
+
The organization respects the enterprise policy, so enabling is rejected when the enterprise disallows AI Scan.
|
|
68
|
+
OAuth app tokens and personal access tokens (classic) need the admin:org, repo, or write:org scope to use this endpoint. Organization owners can use admin:org or repo; security managers need write:org.
|
|
69
|
+
|
|
70
|
+
### Parameters
|
|
71
|
+
|
|
72
|
+
#### Headers
|
|
73
|
+
|
|
74
|
+
* **`accept`** (string)
|
|
75
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
76
|
+
|
|
77
|
+
#### Path and query parameters
|
|
78
|
+
|
|
79
|
+
* **`org`** (string) (required)
|
|
80
|
+
The organization name. The name is not case sensitive.
|
|
81
|
+
|
|
82
|
+
#### Body parameters
|
|
83
|
+
|
|
84
|
+
* **`pr_scan`** (string)
|
|
85
|
+
Whether AI Scan on pull requests is enabled for the organization. Organization respects enterprise policy. Disabled organizations prevent repositories from enabling AI Scan. Enabled organizations enable AI Scan for their repositories, but individual repositories can opt out.
|
|
86
|
+
Can be one of: `enabled`, `disabled`
|
|
87
|
+
|
|
88
|
+
* **`repository_scan`** (string)
|
|
89
|
+
Whether the full repository AI Scan is enabled for the organization. Organization respects enterprise policy. Disabled organizations prevent repositories from enabling the full repository AI Scan. Enabled organizations enable it for their repositories, but individual repositories can opt out.
|
|
90
|
+
Can be one of: `enabled`, `disabled`
|
|
91
|
+
|
|
92
|
+
### HTTP response status codes
|
|
93
|
+
|
|
94
|
+
* **200** - OK
|
|
95
|
+
|
|
96
|
+
* **403** - Forbidden
|
|
97
|
+
|
|
98
|
+
* **404** - Resource not found
|
|
99
|
+
|
|
100
|
+
* **422** - Validation failed, or the endpoint has been spammed.
|
|
101
|
+
|
|
102
|
+
### Code examples
|
|
103
|
+
|
|
104
|
+
#### Example
|
|
105
|
+
|
|
106
|
+
**Request:**
|
|
107
|
+
|
|
108
|
+
```curl
|
|
109
|
+
curl -L \
|
|
110
|
+
-X PATCH \
|
|
111
|
+
https://api.github.com/orgs/ORG/code-scanning/ai-scan \
|
|
112
|
+
-d '{
|
|
113
|
+
"pr_scan": "enabled",
|
|
114
|
+
"repository_scan": "enabled"
|
|
115
|
+
}'
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Response schema (Status: 200):**
|
|
119
|
+
|
|
120
|
+
Same response schema as [Get the AI Scan setting for an organization](#get-the-ai-scan-setting-for-an-organization).
|
|
121
|
+
|
|
122
|
+
## List code scanning alerts for an organization
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
GET /orgs/{org}/code-scanning/alerts
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "Managing security managers in your organization."
|
|
129
|
+
The authenticated user must be an owner or security manager for the organization to use this endpoint.
|
|
130
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events or repos cope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
131
|
+
|
|
132
|
+
### Parameters
|
|
133
|
+
|
|
134
|
+
#### Headers
|
|
135
|
+
|
|
136
|
+
* **`accept`** (string)
|
|
137
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
138
|
+
|
|
139
|
+
#### Path and query parameters
|
|
140
|
+
|
|
141
|
+
* **`org`** (string) (required)
|
|
142
|
+
The organization name. The name is not case sensitive.
|
|
143
|
+
|
|
144
|
+
* **`tool_name`** (string)
|
|
145
|
+
The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either tool\_name or tool\_guid, but not both.
|
|
146
|
+
|
|
147
|
+
* **`tool_guid`** (string or null)
|
|
148
|
+
The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either tool\_guid or tool\_name, but not both.
|
|
149
|
+
|
|
150
|
+
* **`before`** (string)
|
|
151
|
+
A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."
|
|
152
|
+
|
|
153
|
+
* **`after`** (string)
|
|
154
|
+
A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."
|
|
155
|
+
|
|
156
|
+
* **`page`** (integer)
|
|
157
|
+
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
|
|
158
|
+
Default: `1`
|
|
159
|
+
|
|
160
|
+
* **`per_page`** (integer)
|
|
161
|
+
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
|
|
162
|
+
Default: `30`
|
|
163
|
+
|
|
164
|
+
* **`direction`** (string)
|
|
165
|
+
The direction to sort the results by.
|
|
166
|
+
Default: `desc`
|
|
167
|
+
Can be one of: `asc`, `desc`
|
|
168
|
+
|
|
169
|
+
* **`state`** (string)
|
|
170
|
+
If specified, only code scanning alerts with this state will be returned.
|
|
171
|
+
Can be one of: `open`, `closed`, `dismissed`, `fixed`
|
|
172
|
+
|
|
173
|
+
* **`sort`** (string)
|
|
174
|
+
The property by which to sort the results.
|
|
175
|
+
Default: `created`
|
|
176
|
+
Can be one of: `created`, `updated`
|
|
177
|
+
|
|
178
|
+
* **`severity`** (string)
|
|
179
|
+
If specified, only code scanning alerts with this severity will be returned.
|
|
180
|
+
Can be one of: `critical`, `high`, `medium`, `low`, `warning`, `note`, `error`
|
|
181
|
+
|
|
182
|
+
* **`assignees`** (string)
|
|
183
|
+
Filter alerts by assignees. Provide a comma-separated list of user handles (e.g., octocat or octocat,hubot).
|
|
184
|
+
Use \* to list alerts with at least one assignee or none to list alerts with no assignees.
|
|
185
|
+
|
|
186
|
+
### HTTP response status codes
|
|
187
|
+
|
|
188
|
+
* **200** - OK
|
|
189
|
+
|
|
190
|
+
* **404** - Resource not found
|
|
191
|
+
|
|
192
|
+
* **503** - Service unavailable
|
|
193
|
+
|
|
194
|
+
### Code examples
|
|
195
|
+
|
|
196
|
+
#### Example
|
|
197
|
+
|
|
198
|
+
**Request:**
|
|
199
|
+
|
|
200
|
+
```curl
|
|
201
|
+
curl -L \
|
|
202
|
+
-X GET \
|
|
203
|
+
https://api.github.com/orgs/ORG/code-scanning/alerts
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Response schema (Status: 200):**
|
|
207
|
+
|
|
208
|
+
Array of objects:
|
|
209
|
+
|
|
210
|
+
* `number`: required, integer, read-only
|
|
211
|
+
* `created_at`: required, string, format: date-time, read-only
|
|
212
|
+
* `updated_at`: string, format: date-time, read-only
|
|
213
|
+
* `url`: required, string, format: uri, read-only
|
|
214
|
+
* `html_url`: required, string, format: uri, read-only
|
|
215
|
+
* `instances_url`: required, string, format: uri, read-only
|
|
216
|
+
* `state`: required, string or null, enum: `open`, `dismissed`, `fixed`, `null`
|
|
217
|
+
* `fixed_at`: string or null, format: date-time, read-only
|
|
218
|
+
* `dismissed_by`: required, any of:
|
|
219
|
+
* **null**
|
|
220
|
+
* **Simple User**
|
|
221
|
+
* `name`: string or null
|
|
222
|
+
* `email`: string or null
|
|
223
|
+
* `login`: required, string
|
|
224
|
+
* `id`: required, integer, format: int64
|
|
225
|
+
* `node_id`: required, string
|
|
226
|
+
* `avatar_url`: required, string, format: uri
|
|
227
|
+
* `gravatar_id`: required, string or null
|
|
228
|
+
* `url`: required, string, format: uri
|
|
229
|
+
* `html_url`: required, string, format: uri
|
|
230
|
+
* `followers_url`: required, string, format: uri
|
|
231
|
+
* `following_url`: required, string
|
|
232
|
+
* `gists_url`: required, string
|
|
233
|
+
* `starred_url`: required, string
|
|
234
|
+
* `subscriptions_url`: required, string, format: uri
|
|
235
|
+
* `organizations_url`: required, string, format: uri
|
|
236
|
+
* `repos_url`: required, string, format: uri
|
|
237
|
+
* `events_url`: required, string
|
|
238
|
+
* `received_events_url`: required, string, format: uri
|
|
239
|
+
* `type`: required, string
|
|
240
|
+
* `site_admin`: required, boolean
|
|
241
|
+
* `starred_at`: string
|
|
242
|
+
* `user_view_type`: string
|
|
243
|
+
* `dismissed_at`: required, string or null, format: date-time, read-only
|
|
244
|
+
* `dismissed_reason`: required, string or null, enum: `false positive`, `won't fix`, `used in tests`, `mitigated`, `null`
|
|
245
|
+
* `dismissed_comment`: string or null, maxLength: 280
|
|
246
|
+
* `rule`: required, object:
|
|
247
|
+
* `id`: string or null
|
|
248
|
+
* `name`: string
|
|
249
|
+
* `severity`: string or null, enum: `none`, `note`, `warning`, `error`, `null`
|
|
250
|
+
* `security_severity_level`: string or null, enum: `low`, `medium`, `high`, `critical`, `null`
|
|
251
|
+
* `description`: string
|
|
252
|
+
* `full_description`: string
|
|
253
|
+
* `tags`: array of string or null
|
|
254
|
+
* `help`: string or null
|
|
255
|
+
* `help_uri`: string or null
|
|
256
|
+
* `tool`: required, object:
|
|
257
|
+
* `name`: string
|
|
258
|
+
* `version`: string or null
|
|
259
|
+
* `guid`: string or null
|
|
260
|
+
* `most_recent_instance`: required, object:
|
|
261
|
+
* `ref`: string
|
|
262
|
+
* `analysis_key`: string
|
|
263
|
+
* `environment`: string
|
|
264
|
+
* `category`: string
|
|
265
|
+
* `state`: string or null, enum: `open`, `dismissed`, `fixed`, `null`
|
|
266
|
+
* `commit_sha`: string
|
|
267
|
+
* `message`: object:
|
|
268
|
+
* `text`: string
|
|
269
|
+
* `markdown`: string
|
|
270
|
+
* `location`: object:
|
|
271
|
+
* `path`: string
|
|
272
|
+
* `start_line`: integer
|
|
273
|
+
* `end_line`: integer
|
|
274
|
+
* `start_column`: integer
|
|
275
|
+
* `end_column`: integer
|
|
276
|
+
* `html_url`: string
|
|
277
|
+
* `classifications`: array of string or null, enum: `source`, `generated`, `test`, `library`, `null`
|
|
278
|
+
* `repository`: required, `Simple Repository`:
|
|
279
|
+
* `id`: required, integer, format: int64
|
|
280
|
+
* `node_id`: required, string
|
|
281
|
+
* `name`: required, string
|
|
282
|
+
* `full_name`: required, string
|
|
283
|
+
* `owner`: required, `Simple User` (see above)
|
|
284
|
+
* `private`: required, boolean
|
|
285
|
+
* `html_url`: required, string, format: uri
|
|
286
|
+
* `description`: required, string or null
|
|
287
|
+
* `fork`: required, boolean
|
|
288
|
+
* `url`: required, string, format: uri
|
|
289
|
+
* `archive_url`: required, string
|
|
290
|
+
* `assignees_url`: required, string
|
|
291
|
+
* `blobs_url`: required, string
|
|
292
|
+
* `branches_url`: required, string
|
|
293
|
+
* `collaborators_url`: required, string
|
|
294
|
+
* `comments_url`: required, string
|
|
295
|
+
* `commits_url`: required, string
|
|
296
|
+
* `compare_url`: required, string
|
|
297
|
+
* `contents_url`: required, string
|
|
298
|
+
* `contributors_url`: required, string, format: uri
|
|
299
|
+
* `deployments_url`: required, string, format: uri
|
|
300
|
+
* `downloads_url`: required, string, format: uri
|
|
301
|
+
* `events_url`: required, string, format: uri
|
|
302
|
+
* `forks_url`: required, string, format: uri
|
|
303
|
+
* `git_commits_url`: required, string
|
|
304
|
+
* `git_refs_url`: required, string
|
|
305
|
+
* `git_tags_url`: required, string
|
|
306
|
+
* `issue_comment_url`: required, string
|
|
307
|
+
* `issue_events_url`: required, string
|
|
308
|
+
* `issues_url`: required, string
|
|
309
|
+
* `keys_url`: required, string
|
|
310
|
+
* `labels_url`: required, string
|
|
311
|
+
* `languages_url`: required, string, format: uri
|
|
312
|
+
* `merges_url`: required, string, format: uri
|
|
313
|
+
* `milestones_url`: required, string
|
|
314
|
+
* `notifications_url`: required, string
|
|
315
|
+
* `pulls_url`: required, string
|
|
316
|
+
* `releases_url`: required, string
|
|
317
|
+
* `stargazers_url`: required, string, format: uri
|
|
318
|
+
* `statuses_url`: required, string
|
|
319
|
+
* `subscribers_url`: required, string, format: uri
|
|
320
|
+
* `subscription_url`: required, string, format: uri
|
|
321
|
+
* `tags_url`: required, string, format: uri
|
|
322
|
+
* `teams_url`: required, string, format: uri
|
|
323
|
+
* `trees_url`: required, string
|
|
324
|
+
* `hooks_url`: required, string, format: uri
|
|
325
|
+
* `dismissal_approved_by`: any of:
|
|
326
|
+
* **null**
|
|
327
|
+
* **Simple User** (see above)
|
|
328
|
+
* `assignees`: array of `Simple User` (see above)
|
|
329
|
+
|
|
330
|
+
## Get AI Scan enablement for a repository
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
GET /repos/{owner}/{repo}/code-scanning/ai-scan
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Gets whether AI Scan is enabled for a repository.
|
|
337
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
338
|
+
|
|
339
|
+
### Parameters
|
|
340
|
+
|
|
341
|
+
#### Headers
|
|
342
|
+
|
|
343
|
+
* **`accept`** (string)
|
|
344
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
345
|
+
|
|
346
|
+
#### Path and query parameters
|
|
347
|
+
|
|
348
|
+
* **`owner`** (string) (required)
|
|
349
|
+
The account owner of the repository. The name is not case sensitive.
|
|
350
|
+
|
|
351
|
+
* **`repo`** (string) (required)
|
|
352
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
353
|
+
|
|
354
|
+
### HTTP response status codes
|
|
355
|
+
|
|
356
|
+
* **200** - OK
|
|
357
|
+
|
|
358
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
359
|
+
|
|
360
|
+
* **404** - Resource not found
|
|
361
|
+
|
|
362
|
+
### Code examples
|
|
363
|
+
|
|
364
|
+
#### Example
|
|
365
|
+
|
|
366
|
+
**Request:**
|
|
367
|
+
|
|
368
|
+
```curl
|
|
369
|
+
curl -L \
|
|
370
|
+
-X GET \
|
|
371
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/ai-scan
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**Response schema (Status: 200):**
|
|
375
|
+
|
|
376
|
+
Same response schema as [Get the AI Scan setting for an organization](#get-the-ai-scan-setting-for-an-organization).
|
|
377
|
+
|
|
378
|
+
## Update AI Scan enablement for a repository
|
|
379
|
+
|
|
380
|
+
```
|
|
381
|
+
PATCH /repos/{owner}/{repo}/code-scanning/ai-scan
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Updates whether AI Scan is enabled for a repository.
|
|
385
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
386
|
+
|
|
387
|
+
### Parameters
|
|
388
|
+
|
|
389
|
+
#### Headers
|
|
390
|
+
|
|
391
|
+
* **`accept`** (string)
|
|
392
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
393
|
+
|
|
394
|
+
#### Path and query parameters
|
|
395
|
+
|
|
396
|
+
* **`owner`** (string) (required)
|
|
397
|
+
The account owner of the repository. The name is not case sensitive.
|
|
398
|
+
|
|
399
|
+
* **`repo`** (string) (required)
|
|
400
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
401
|
+
|
|
402
|
+
#### Body parameters
|
|
403
|
+
|
|
404
|
+
* **`pr_scan`** (string)
|
|
405
|
+
Whether to enable or disable AI Scan on pull requests for the repository.
|
|
406
|
+
Can be one of: `enabled`, `disabled`
|
|
407
|
+
|
|
408
|
+
* **`repository_scan`** (string)
|
|
409
|
+
Whether to enable or disable the full repository AI Scan for the repository.
|
|
410
|
+
Can be one of: `enabled`, `disabled`
|
|
411
|
+
|
|
412
|
+
### HTTP response status codes
|
|
413
|
+
|
|
414
|
+
* **200** - OK
|
|
415
|
+
|
|
416
|
+
* **403** - Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
|
|
417
|
+
|
|
418
|
+
* **404** - Resource not found
|
|
419
|
+
|
|
420
|
+
* **422** - Validation failed, or the endpoint has been spammed.
|
|
421
|
+
|
|
422
|
+
### Code examples
|
|
423
|
+
|
|
424
|
+
#### Enable AI Scan
|
|
425
|
+
|
|
426
|
+
**Request:**
|
|
427
|
+
|
|
428
|
+
```curl
|
|
429
|
+
curl -L \
|
|
430
|
+
-X PATCH \
|
|
431
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/ai-scan \
|
|
432
|
+
-d '{
|
|
433
|
+
"pr_scan": "enabled"
|
|
434
|
+
}'
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**Response schema (Status: 200):**
|
|
438
|
+
|
|
439
|
+
Same response schema as [Get the AI Scan setting for an organization](#get-the-ai-scan-setting-for-an-organization).
|
|
440
|
+
|
|
441
|
+
## List code scanning alerts for a repository
|
|
442
|
+
|
|
443
|
+
```
|
|
444
|
+
GET /repos/{owner}/{repo}/code-scanning/alerts
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Lists code scanning alerts.
|
|
448
|
+
The response includes a most\_recent\_instance object.
|
|
449
|
+
This provides details of the most recent instance of this alert
|
|
450
|
+
for the default branch (or for the specified Git reference if you used ref in the request).
|
|
451
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
452
|
+
|
|
453
|
+
### Parameters
|
|
454
|
+
|
|
455
|
+
#### Headers
|
|
456
|
+
|
|
457
|
+
* **`accept`** (string)
|
|
458
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
459
|
+
|
|
460
|
+
#### Path and query parameters
|
|
461
|
+
|
|
462
|
+
* **`owner`** (string) (required)
|
|
463
|
+
The account owner of the repository. The name is not case sensitive.
|
|
464
|
+
|
|
465
|
+
* **`repo`** (string) (required)
|
|
466
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
467
|
+
|
|
468
|
+
* **`tool_name`** (string)
|
|
469
|
+
The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either tool\_name or tool\_guid, but not both.
|
|
470
|
+
|
|
471
|
+
* **`tool_guid`** (string or null)
|
|
472
|
+
The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either tool\_guid or tool\_name, but not both.
|
|
473
|
+
|
|
474
|
+
* **`page`** (integer)
|
|
475
|
+
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
|
|
476
|
+
Default: `1`
|
|
477
|
+
|
|
478
|
+
* **`per_page`** (integer)
|
|
479
|
+
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
|
|
480
|
+
Default: `30`
|
|
481
|
+
|
|
482
|
+
* **`ref`** (string)
|
|
483
|
+
The Git reference for the results you want to list. The ref for a branch can be formatted either as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge.
|
|
484
|
+
|
|
485
|
+
* **`pr`** (integer)
|
|
486
|
+
The number of the pull request for the results you want to list.
|
|
487
|
+
|
|
488
|
+
* **`direction`** (string)
|
|
489
|
+
The direction to sort the results by.
|
|
490
|
+
Default: `desc`
|
|
491
|
+
Can be one of: `asc`, `desc`
|
|
492
|
+
|
|
493
|
+
* **`before`** (string)
|
|
494
|
+
A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."
|
|
495
|
+
|
|
496
|
+
* **`after`** (string)
|
|
497
|
+
A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."
|
|
498
|
+
|
|
499
|
+
* **`sort`** (string)
|
|
500
|
+
The property by which to sort the results.
|
|
501
|
+
Default: `created`
|
|
502
|
+
Can be one of: `created`, `updated`
|
|
503
|
+
|
|
504
|
+
* **`state`** (string)
|
|
505
|
+
If specified, only code scanning alerts with this state will be returned.
|
|
506
|
+
Can be one of: `open`, `closed`, `dismissed`, `fixed`
|
|
507
|
+
|
|
508
|
+
* **`severity`** (string)
|
|
509
|
+
If specified, only code scanning alerts with this severity will be returned.
|
|
510
|
+
Can be one of: `critical`, `high`, `medium`, `low`, `warning`, `note`, `error`
|
|
511
|
+
|
|
512
|
+
* **`assignees`** (string)
|
|
513
|
+
Filter alerts by assignees. Provide a comma-separated list of user handles (e.g., octocat or octocat,hubot).
|
|
514
|
+
Use \* to list alerts with at least one assignee or none to list alerts with no assignees.
|
|
515
|
+
|
|
516
|
+
### HTTP response status codes
|
|
517
|
+
|
|
518
|
+
* **200** - OK
|
|
519
|
+
|
|
520
|
+
* **304** - Not modified
|
|
521
|
+
|
|
522
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
523
|
+
|
|
524
|
+
* **404** - Resource not found
|
|
525
|
+
|
|
526
|
+
* **503** - Service unavailable
|
|
527
|
+
|
|
528
|
+
### Code examples
|
|
529
|
+
|
|
530
|
+
#### Example
|
|
531
|
+
|
|
532
|
+
**Request:**
|
|
533
|
+
|
|
534
|
+
```curl
|
|
535
|
+
curl -L \
|
|
536
|
+
-X GET \
|
|
537
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/alerts
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
**Response schema (Status: 200):**
|
|
541
|
+
|
|
542
|
+
Array of objects:
|
|
543
|
+
|
|
544
|
+
* `number`: required, integer, read-only
|
|
545
|
+
* `created_at`: required, string, format: date-time, read-only
|
|
546
|
+
* `updated_at`: string, format: date-time, read-only
|
|
547
|
+
* `url`: required, string, format: uri, read-only
|
|
548
|
+
* `html_url`: required, string, format: uri, read-only
|
|
549
|
+
* `instances_url`: required, string, format: uri, read-only
|
|
550
|
+
* `state`: required, string or null, enum: `open`, `dismissed`, `fixed`, `null`
|
|
551
|
+
* `fixed_at`: string or null, format: date-time, read-only
|
|
552
|
+
* `dismissed_by`: required, any of:
|
|
553
|
+
* **null**
|
|
554
|
+
* **Simple User**
|
|
555
|
+
* `name`: string or null
|
|
556
|
+
* `email`: string or null
|
|
557
|
+
* `login`: required, string
|
|
558
|
+
* `id`: required, integer, format: int64
|
|
559
|
+
* `node_id`: required, string
|
|
560
|
+
* `avatar_url`: required, string, format: uri
|
|
561
|
+
* `gravatar_id`: required, string or null
|
|
562
|
+
* `url`: required, string, format: uri
|
|
563
|
+
* `html_url`: required, string, format: uri
|
|
564
|
+
* `followers_url`: required, string, format: uri
|
|
565
|
+
* `following_url`: required, string
|
|
566
|
+
* `gists_url`: required, string
|
|
567
|
+
* `starred_url`: required, string
|
|
568
|
+
* `subscriptions_url`: required, string, format: uri
|
|
569
|
+
* `organizations_url`: required, string, format: uri
|
|
570
|
+
* `repos_url`: required, string, format: uri
|
|
571
|
+
* `events_url`: required, string
|
|
572
|
+
* `received_events_url`: required, string, format: uri
|
|
573
|
+
* `type`: required, string
|
|
574
|
+
* `site_admin`: required, boolean
|
|
575
|
+
* `starred_at`: string
|
|
576
|
+
* `user_view_type`: string
|
|
577
|
+
* `dismissed_at`: required, string or null, format: date-time, read-only
|
|
578
|
+
* `dismissed_reason`: required, string or null, enum: `false positive`, `won't fix`, `used in tests`, `mitigated`, `null`
|
|
579
|
+
* `dismissed_comment`: string or null, maxLength: 280
|
|
580
|
+
* `rule`: required, object:
|
|
581
|
+
* `id`: string or null
|
|
582
|
+
* `name`: string
|
|
583
|
+
* `severity`: string or null, enum: `none`, `note`, `warning`, `error`, `null`
|
|
584
|
+
* `security_severity_level`: string or null, enum: `low`, `medium`, `high`, `critical`, `null`
|
|
585
|
+
* `description`: string
|
|
586
|
+
* `full_description`: string
|
|
587
|
+
* `tags`: array of string or null
|
|
588
|
+
* `help`: string or null
|
|
589
|
+
* `help_uri`: string or null
|
|
590
|
+
* `tool`: required, object:
|
|
591
|
+
* `name`: string
|
|
592
|
+
* `version`: string or null
|
|
593
|
+
* `guid`: string or null
|
|
594
|
+
* `most_recent_instance`: required, object:
|
|
595
|
+
* `ref`: string
|
|
596
|
+
* `analysis_key`: string
|
|
597
|
+
* `environment`: string
|
|
598
|
+
* `category`: string
|
|
599
|
+
* `state`: string or null, enum: `open`, `dismissed`, `fixed`, `null`
|
|
600
|
+
* `commit_sha`: string
|
|
601
|
+
* `message`: object:
|
|
602
|
+
* `text`: string
|
|
603
|
+
* `markdown`: string
|
|
604
|
+
* `location`: object:
|
|
605
|
+
* `path`: string
|
|
606
|
+
* `start_line`: integer
|
|
607
|
+
* `end_line`: integer
|
|
608
|
+
* `start_column`: integer
|
|
609
|
+
* `end_column`: integer
|
|
610
|
+
* `html_url`: string
|
|
611
|
+
* `classifications`: array of string or null, enum: `source`, `generated`, `test`, `library`, `null`
|
|
612
|
+
* `dismissal_approved_by`: any of:
|
|
613
|
+
* **null**
|
|
614
|
+
* **Simple User** (see above)
|
|
615
|
+
* `assignees`: array of `Simple User` (see above)
|
|
616
|
+
* `linked_pull_requests`: array of `Pull Requests on Alerts`:
|
|
617
|
+
* `number`: required, integer
|
|
618
|
+
* `id`: required, integer, format: int64
|
|
619
|
+
* `repository`: required, `Simple Repository`:
|
|
620
|
+
* `id`: required, integer, format: int64
|
|
621
|
+
* `node_id`: required, string
|
|
622
|
+
* `name`: required, string
|
|
623
|
+
* `full_name`: required, string
|
|
624
|
+
* `owner`: required, `Simple User` (see above)
|
|
625
|
+
* `private`: required, boolean
|
|
626
|
+
* `html_url`: required, string, format: uri
|
|
627
|
+
* `description`: required, string or null
|
|
628
|
+
* `fork`: required, boolean
|
|
629
|
+
* `url`: required, string, format: uri
|
|
630
|
+
* `archive_url`: required, string
|
|
631
|
+
* `assignees_url`: required, string
|
|
632
|
+
* `blobs_url`: required, string
|
|
633
|
+
* `branches_url`: required, string
|
|
634
|
+
* `collaborators_url`: required, string
|
|
635
|
+
* `comments_url`: required, string
|
|
636
|
+
* `commits_url`: required, string
|
|
637
|
+
* `compare_url`: required, string
|
|
638
|
+
* `contents_url`: required, string
|
|
639
|
+
* `contributors_url`: required, string, format: uri
|
|
640
|
+
* `deployments_url`: required, string, format: uri
|
|
641
|
+
* `downloads_url`: required, string, format: uri
|
|
642
|
+
* `events_url`: required, string, format: uri
|
|
643
|
+
* `forks_url`: required, string, format: uri
|
|
644
|
+
* `git_commits_url`: required, string
|
|
645
|
+
* `git_refs_url`: required, string
|
|
646
|
+
* `git_tags_url`: required, string
|
|
647
|
+
* `issue_comment_url`: required, string
|
|
648
|
+
* `issue_events_url`: required, string
|
|
649
|
+
* `issues_url`: required, string
|
|
650
|
+
* `keys_url`: required, string
|
|
651
|
+
* `labels_url`: required, string
|
|
652
|
+
* `languages_url`: required, string, format: uri
|
|
653
|
+
* `merges_url`: required, string, format: uri
|
|
654
|
+
* `milestones_url`: required, string
|
|
655
|
+
* `notifications_url`: required, string
|
|
656
|
+
* `pulls_url`: required, string
|
|
657
|
+
* `releases_url`: required, string
|
|
658
|
+
* `stargazers_url`: required, string, format: uri
|
|
659
|
+
* `statuses_url`: required, string
|
|
660
|
+
* `subscribers_url`: required, string, format: uri
|
|
661
|
+
* `subscription_url`: required, string, format: uri
|
|
662
|
+
* `tags_url`: required, string, format: uri
|
|
663
|
+
* `teams_url`: required, string, format: uri
|
|
664
|
+
* `trees_url`: required, string
|
|
665
|
+
* `hooks_url`: required, string, format: uri
|
|
666
|
+
* `title`: required, string
|
|
667
|
+
* `state`: required, string, enum: `open`, `closed`, `merged`
|
|
668
|
+
* `merged_at`: required, string or null, format: date-time
|
|
669
|
+
* `html_url`: required, string, format: uri
|
|
670
|
+
* `url`: required, string, format: uri
|
|
671
|
+
* `draft`: required, boolean
|
|
672
|
+
* `linked_issues`: array of objects:
|
|
673
|
+
* `number`: required, integer
|
|
674
|
+
* `title`: required, string
|
|
675
|
+
* `state`: required, string
|
|
676
|
+
* `url`: required, string, format: uri
|
|
677
|
+
* `html_url`: required, string, format: uri
|
|
678
|
+
* `repository`: required, `Simple Repository` (see above)
|
|
679
|
+
* `issue_type`: required, `Issue Type`:
|
|
680
|
+
* `id`: required, integer
|
|
681
|
+
* `node_id`: required, string
|
|
682
|
+
* `name`: required, string
|
|
683
|
+
* `description`: required, string or null
|
|
684
|
+
* `color`: string or null, enum: `gray`, `blue`, `green`, `yellow`, `orange`, `red`, `pink`, `purple`, `null`
|
|
685
|
+
* `created_at`: string, format: date-time
|
|
686
|
+
* `updated_at`: string, format: date-time
|
|
687
|
+
* `is_enabled`: boolean
|
|
688
|
+
|
|
689
|
+
## Get a code scanning alert
|
|
690
|
+
|
|
691
|
+
```
|
|
692
|
+
GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
Gets a single code scanning alert.
|
|
696
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
697
|
+
|
|
698
|
+
### Parameters
|
|
699
|
+
|
|
700
|
+
#### Headers
|
|
701
|
+
|
|
702
|
+
* **`accept`** (string)
|
|
703
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
704
|
+
|
|
705
|
+
#### Path and query parameters
|
|
706
|
+
|
|
707
|
+
* **`owner`** (string) (required)
|
|
708
|
+
The account owner of the repository. The name is not case sensitive.
|
|
709
|
+
|
|
710
|
+
* **`repo`** (string) (required)
|
|
711
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
712
|
+
|
|
713
|
+
* **`alert_number`** (integer) (required)
|
|
714
|
+
The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
|
|
715
|
+
|
|
716
|
+
### HTTP response status codes
|
|
717
|
+
|
|
718
|
+
* **200** - OK
|
|
719
|
+
|
|
720
|
+
* **304** - Not modified
|
|
721
|
+
|
|
722
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
723
|
+
|
|
724
|
+
* **404** - Resource not found
|
|
725
|
+
|
|
726
|
+
* **503** - Service unavailable
|
|
727
|
+
|
|
728
|
+
### Code examples
|
|
729
|
+
|
|
730
|
+
#### Example
|
|
731
|
+
|
|
732
|
+
**Request:**
|
|
733
|
+
|
|
734
|
+
```curl
|
|
735
|
+
curl -L \
|
|
736
|
+
-X GET \
|
|
737
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/alerts/ALERT_NUMBER
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
**Response schema (Status: 200):**
|
|
741
|
+
|
|
742
|
+
* `number`: required, integer, read-only
|
|
743
|
+
* `created_at`: required, string, format: date-time, read-only
|
|
744
|
+
* `updated_at`: string, format: date-time, read-only
|
|
745
|
+
* `url`: required, string, format: uri, read-only
|
|
746
|
+
* `html_url`: required, string, format: uri, read-only
|
|
747
|
+
* `instances_url`: required, string, format: uri, read-only
|
|
748
|
+
* `state`: required, string or null, enum: `open`, `dismissed`, `fixed`, `null`
|
|
749
|
+
* `fixed_at`: string or null, format: date-time, read-only
|
|
750
|
+
* `dismissed_by`: required, any of:
|
|
751
|
+
* **null**
|
|
752
|
+
* **Simple User**
|
|
753
|
+
* `name`: string or null
|
|
754
|
+
* `email`: string or null
|
|
755
|
+
* `login`: required, string
|
|
756
|
+
* `id`: required, integer, format: int64
|
|
757
|
+
* `node_id`: required, string
|
|
758
|
+
* `avatar_url`: required, string, format: uri
|
|
759
|
+
* `gravatar_id`: required, string or null
|
|
760
|
+
* `url`: required, string, format: uri
|
|
761
|
+
* `html_url`: required, string, format: uri
|
|
762
|
+
* `followers_url`: required, string, format: uri
|
|
763
|
+
* `following_url`: required, string
|
|
764
|
+
* `gists_url`: required, string
|
|
765
|
+
* `starred_url`: required, string
|
|
766
|
+
* `subscriptions_url`: required, string, format: uri
|
|
767
|
+
* `organizations_url`: required, string, format: uri
|
|
768
|
+
* `repos_url`: required, string, format: uri
|
|
769
|
+
* `events_url`: required, string
|
|
770
|
+
* `received_events_url`: required, string, format: uri
|
|
771
|
+
* `type`: required, string
|
|
772
|
+
* `site_admin`: required, boolean
|
|
773
|
+
* `starred_at`: string
|
|
774
|
+
* `user_view_type`: string
|
|
775
|
+
* `dismissed_at`: required, string or null, format: date-time, read-only
|
|
776
|
+
* `dismissed_reason`: required, string or null, enum: `false positive`, `won't fix`, `used in tests`, `mitigated`, `null`
|
|
777
|
+
* `dismissed_comment`: string or null, maxLength: 280
|
|
778
|
+
* `rule`: required, object:
|
|
779
|
+
* `id`: string or null
|
|
780
|
+
* `name`: string
|
|
781
|
+
* `severity`: string or null, enum: `none`, `note`, `warning`, `error`, `null`
|
|
782
|
+
* `security_severity_level`: string or null, enum: `low`, `medium`, `high`, `critical`, `null`
|
|
783
|
+
* `description`: string
|
|
784
|
+
* `full_description`: string
|
|
785
|
+
* `tags`: array of string or null
|
|
786
|
+
* `help`: string or null
|
|
787
|
+
* `help_uri`: string or null
|
|
788
|
+
* `tool`: required, object:
|
|
789
|
+
* `name`: string
|
|
790
|
+
* `version`: string or null
|
|
791
|
+
* `guid`: string or null
|
|
792
|
+
* `most_recent_instance`: required, object:
|
|
793
|
+
* `ref`: string
|
|
794
|
+
* `analysis_key`: string
|
|
795
|
+
* `environment`: string
|
|
796
|
+
* `category`: string
|
|
797
|
+
* `state`: string or null, enum: `open`, `dismissed`, `fixed`, `null`
|
|
798
|
+
* `commit_sha`: string
|
|
799
|
+
* `message`: object:
|
|
800
|
+
* `text`: string
|
|
801
|
+
* `markdown`: string
|
|
802
|
+
* `location`: object:
|
|
803
|
+
* `path`: string
|
|
804
|
+
* `start_line`: integer
|
|
805
|
+
* `end_line`: integer
|
|
806
|
+
* `start_column`: integer
|
|
807
|
+
* `end_column`: integer
|
|
808
|
+
* `html_url`: string
|
|
809
|
+
* `classifications`: array of string or null, enum: `source`, `generated`, `test`, `library`, `null`
|
|
810
|
+
* `dismissal_approved_by`: any of:
|
|
811
|
+
* **null**
|
|
812
|
+
* **Simple User** (see above)
|
|
813
|
+
* `assignees`: array of `Simple User` (see above)
|
|
814
|
+
* `linked_pull_requests`: array of `Pull Request Simple`:
|
|
815
|
+
* `url`: required, string, format: uri
|
|
816
|
+
* `id`: required, integer, format: int64
|
|
817
|
+
* `node_id`: required, string
|
|
818
|
+
* `html_url`: required, string, format: uri
|
|
819
|
+
* `diff_url`: required, string, format: uri
|
|
820
|
+
* `patch_url`: required, string, format: uri
|
|
821
|
+
* `issue_url`: required, string, format: uri
|
|
822
|
+
* `commits_url`: required, string, format: uri
|
|
823
|
+
* `review_comments_url`: required, string, format: uri
|
|
824
|
+
* `review_comment_url`: required, string
|
|
825
|
+
* `comments_url`: required, string, format: uri
|
|
826
|
+
* `statuses_url`: required, string, format: uri
|
|
827
|
+
* `number`: required, integer
|
|
828
|
+
* `state`: required, string
|
|
829
|
+
* `locked`: required, boolean
|
|
830
|
+
* `title`: required, string
|
|
831
|
+
* `user`: required, any of:
|
|
832
|
+
* **null**
|
|
833
|
+
* **Simple User** (see above)
|
|
834
|
+
* `body`: required, string or null
|
|
835
|
+
* `labels`: required, array of objects:
|
|
836
|
+
* `id`: required, integer, format: int64
|
|
837
|
+
* `node_id`: required, string
|
|
838
|
+
* `url`: required, string
|
|
839
|
+
* `name`: required, string
|
|
840
|
+
* `description`: required, string
|
|
841
|
+
* `color`: required, string
|
|
842
|
+
* `default`: required, boolean
|
|
843
|
+
* `archived_by`: required, all of:
|
|
844
|
+
* **Simple User** (see above)
|
|
845
|
+
* `milestone`: required, any of:
|
|
846
|
+
* **null**
|
|
847
|
+
* **Milestone**
|
|
848
|
+
* `url`: required, string, format: uri
|
|
849
|
+
* `html_url`: required, string, format: uri
|
|
850
|
+
* `labels_url`: required, string, format: uri
|
|
851
|
+
* `id`: required, integer
|
|
852
|
+
* `node_id`: required, string
|
|
853
|
+
* `number`: required, integer
|
|
854
|
+
* `state`: required, string, enum: `open`, `closed`, default: `"open"`
|
|
855
|
+
* `title`: required, string
|
|
856
|
+
* `description`: required, string or null
|
|
857
|
+
* `creator`: required, any of:
|
|
858
|
+
* **null**
|
|
859
|
+
* **Simple User** (see above)
|
|
860
|
+
* `open_issues`: required, integer
|
|
861
|
+
* `closed_issues`: required, integer
|
|
862
|
+
* `created_at`: required, string, format: date-time
|
|
863
|
+
* `updated_at`: required, string, format: date-time
|
|
864
|
+
* `closed_at`: required, string or null, format: date-time
|
|
865
|
+
* `due_on`: required, string or null, format: date-time
|
|
866
|
+
* `active_lock_reason`: string or null
|
|
867
|
+
* `created_at`: required, string, format: date-time
|
|
868
|
+
* `updated_at`: required, string, format: date-time
|
|
869
|
+
* `closed_at`: required, string or null, format: date-time
|
|
870
|
+
* `merged_at`: required, string or null, format: date-time
|
|
871
|
+
* `assignees`: array of `Simple User` (see above)
|
|
872
|
+
* `requested_reviewers`: array of `Simple User` (see above)
|
|
873
|
+
* `requested_teams`: array of `Team`:
|
|
874
|
+
* `id`: required, integer
|
|
875
|
+
* `node_id`: required, string
|
|
876
|
+
* `name`: required, string
|
|
877
|
+
* `slug`: required, string
|
|
878
|
+
* `description`: required, string or null
|
|
879
|
+
* `privacy`: string
|
|
880
|
+
* `notification_setting`: string
|
|
881
|
+
* `permission`: required, string
|
|
882
|
+
* `permissions`: object:
|
|
883
|
+
* `pull`: required, boolean
|
|
884
|
+
* `triage`: required, boolean
|
|
885
|
+
* `push`: required, boolean
|
|
886
|
+
* `maintain`: required, boolean
|
|
887
|
+
* `admin`: required, boolean
|
|
888
|
+
* `url`: required, string, format: uri
|
|
889
|
+
* `html_url`: required, string, format: uri
|
|
890
|
+
* `members_url`: required, string
|
|
891
|
+
* `repositories_url`: required, string, format: uri
|
|
892
|
+
* `type`: required, string, enum: `enterprise`, `organization`
|
|
893
|
+
* `access_source`: string, enum: `direct`, `organization`, `enterprise`
|
|
894
|
+
* `organization_id`: integer
|
|
895
|
+
* `enterprise_id`: integer
|
|
896
|
+
* `parent`: required, any of:
|
|
897
|
+
* **null**
|
|
898
|
+
* **Team Simple**
|
|
899
|
+
* `id`: required, integer
|
|
900
|
+
* `node_id`: required, string
|
|
901
|
+
* `url`: required, string, format: uri
|
|
902
|
+
* `members_url`: required, string
|
|
903
|
+
* `name`: required, string
|
|
904
|
+
* `description`: required, string or null
|
|
905
|
+
* `permission`: required, string
|
|
906
|
+
* `privacy`: string
|
|
907
|
+
* `notification_setting`: string
|
|
908
|
+
* `html_url`: required, string, format: uri
|
|
909
|
+
* `repositories_url`: required, string, format: uri
|
|
910
|
+
* `slug`: required, string
|
|
911
|
+
* `ldap_dn`: string
|
|
912
|
+
* `type`: required, string, enum: `enterprise`, `organization`
|
|
913
|
+
* `organization_id`: integer
|
|
914
|
+
* `enterprise_id`: integer
|
|
915
|
+
* `head`: required, object:
|
|
916
|
+
* `label`: required, string
|
|
917
|
+
* `ref`: required, string
|
|
918
|
+
* `repo`: required, `Repository`:
|
|
919
|
+
* `id`: required, integer, format: int64
|
|
920
|
+
* `node_id`: required, string
|
|
921
|
+
* `name`: required, string
|
|
922
|
+
* `full_name`: required, string
|
|
923
|
+
* `license`: required, any of:
|
|
924
|
+
* **null**
|
|
925
|
+
* **License Simple**
|
|
926
|
+
* `key`: required, string
|
|
927
|
+
* `name`: required, string
|
|
928
|
+
* `url`: required, string or null, format: uri
|
|
929
|
+
* `spdx_id`: required, string or null
|
|
930
|
+
* `node_id`: required, string
|
|
931
|
+
* `html_url`: string, format: uri
|
|
932
|
+
* `forks`: required, integer
|
|
933
|
+
* `permissions`: object:
|
|
934
|
+
* `admin`: required, boolean
|
|
935
|
+
* `pull`: required, boolean
|
|
936
|
+
* `triage`: boolean
|
|
937
|
+
* `push`: required, boolean
|
|
938
|
+
* `maintain`: boolean
|
|
939
|
+
* `owner`: required, `Simple User` (see above)
|
|
940
|
+
* `private`: required, boolean, default: `false`
|
|
941
|
+
* `html_url`: required, string, format: uri
|
|
942
|
+
* `description`: required, string or null
|
|
943
|
+
* `fork`: required, boolean
|
|
944
|
+
* `url`: required, string, format: uri
|
|
945
|
+
* `archive_url`: required, string
|
|
946
|
+
* `assignees_url`: required, string
|
|
947
|
+
* `blobs_url`: required, string
|
|
948
|
+
* `branches_url`: required, string
|
|
949
|
+
* `collaborators_url`: required, string
|
|
950
|
+
* `comments_url`: required, string
|
|
951
|
+
* `commits_url`: required, string
|
|
952
|
+
* `compare_url`: required, string
|
|
953
|
+
* `contents_url`: required, string
|
|
954
|
+
* `contributors_url`: required, string, format: uri
|
|
955
|
+
* `deployments_url`: required, string, format: uri
|
|
956
|
+
* `downloads_url`: required, string, format: uri
|
|
957
|
+
* `events_url`: required, string, format: uri
|
|
958
|
+
* `forks_url`: required, string, format: uri
|
|
959
|
+
* `git_commits_url`: required, string
|
|
960
|
+
* `git_refs_url`: required, string
|
|
961
|
+
* `git_tags_url`: required, string
|
|
962
|
+
* `git_url`: required, string
|
|
963
|
+
* `issue_comment_url`: required, string
|
|
964
|
+
* `issue_events_url`: required, string
|
|
965
|
+
* `issues_url`: required, string
|
|
966
|
+
* `keys_url`: required, string
|
|
967
|
+
* `labels_url`: required, string
|
|
968
|
+
* `languages_url`: required, string, format: uri
|
|
969
|
+
* `merges_url`: required, string, format: uri
|
|
970
|
+
* `milestones_url`: required, string
|
|
971
|
+
* `notifications_url`: required, string
|
|
972
|
+
* `pulls_url`: required, string
|
|
973
|
+
* `releases_url`: required, string
|
|
974
|
+
* `ssh_url`: required, string
|
|
975
|
+
* `stargazers_url`: required, string, format: uri
|
|
976
|
+
* `statuses_url`: required, string
|
|
977
|
+
* `subscribers_url`: required, string, format: uri
|
|
978
|
+
* `subscription_url`: required, string, format: uri
|
|
979
|
+
* `tags_url`: required, string, format: uri
|
|
980
|
+
* `teams_url`: required, string, format: uri
|
|
981
|
+
* `trees_url`: required, string
|
|
982
|
+
* `clone_url`: required, string
|
|
983
|
+
* `mirror_url`: required, string or null, format: uri
|
|
984
|
+
* `hooks_url`: required, string, format: uri
|
|
985
|
+
* `svn_url`: required, string, format: uri
|
|
986
|
+
* `homepage`: required, string or null, format: uri
|
|
987
|
+
* `language`: required, string or null
|
|
988
|
+
* `forks_count`: required, integer
|
|
989
|
+
* `stargazers_count`: required, integer
|
|
990
|
+
* `watchers_count`: required, integer
|
|
991
|
+
* `size`: required, integer
|
|
992
|
+
* `default_branch`: required, string
|
|
993
|
+
* `open_issues_count`: required, integer
|
|
994
|
+
* `is_template`: boolean, default: `false`
|
|
995
|
+
* `topics`: array of string
|
|
996
|
+
* `has_issues`: required, boolean, default: `true`
|
|
997
|
+
* `has_projects`: required, boolean, default: `true`
|
|
998
|
+
* `has_wiki`: required, boolean, default: `true`
|
|
999
|
+
* `has_pages`: required, boolean
|
|
1000
|
+
* `has_discussions`: boolean, default: `false`
|
|
1001
|
+
* `has_pull_requests`: boolean, default: `true`
|
|
1002
|
+
* `pull_request_creation_policy`: string, enum: `all`, `collaborators_only`
|
|
1003
|
+
* `archived`: required, boolean, default: `false`
|
|
1004
|
+
* `disabled`: required, boolean
|
|
1005
|
+
* `visibility`: string, default: `"public"`
|
|
1006
|
+
* `pushed_at`: required, string or null, format: date-time
|
|
1007
|
+
* `created_at`: required, string or null, format: date-time
|
|
1008
|
+
* `updated_at`: required, string or null, format: date-time
|
|
1009
|
+
* `allow_rebase_merge`: boolean, default: `true`
|
|
1010
|
+
* `temp_clone_token`: string
|
|
1011
|
+
* `allow_squash_merge`: boolean, default: `true`
|
|
1012
|
+
* `allow_auto_merge`: boolean, default: `false`
|
|
1013
|
+
* `delete_branch_on_merge`: boolean, default: `false`
|
|
1014
|
+
* `allow_update_branch`: boolean, default: `false`
|
|
1015
|
+
* `squash_merge_commit_title`: string, enum: `PR_TITLE`, `COMMIT_OR_PR_TITLE`
|
|
1016
|
+
* `squash_merge_commit_message`: string, enum: `PR_BODY`, `COMMIT_MESSAGES`, `BLANK`
|
|
1017
|
+
* `merge_commit_title`: string, enum: `PR_TITLE`, `MERGE_MESSAGE`
|
|
1018
|
+
* `merge_commit_message`: string, enum: `PR_BODY`, `PR_TITLE`, `BLANK`
|
|
1019
|
+
* `allow_merge_commit`: boolean, default: `true`
|
|
1020
|
+
* `allow_forking`: boolean
|
|
1021
|
+
* `web_commit_signoff_required`: boolean, default: `false`
|
|
1022
|
+
* `open_issues`: required, integer
|
|
1023
|
+
* `watchers`: required, integer
|
|
1024
|
+
* `starred_at`: string
|
|
1025
|
+
* `anonymous_access_enabled`: boolean
|
|
1026
|
+
* `code_search_index_status`: object:
|
|
1027
|
+
* `lexical_search_ok`: boolean
|
|
1028
|
+
* `lexical_commit_sha`: string
|
|
1029
|
+
* `sha`: required, string
|
|
1030
|
+
* `user`: required, any of:
|
|
1031
|
+
* **null**
|
|
1032
|
+
* **Simple User** (see above)
|
|
1033
|
+
* `base`: required, object:
|
|
1034
|
+
* `label`: required, string
|
|
1035
|
+
* `ref`: required, string
|
|
1036
|
+
* `repo`: required, `Repository` (see above)
|
|
1037
|
+
* `sha`: required, string
|
|
1038
|
+
* `user`: required, any of:
|
|
1039
|
+
* **null**
|
|
1040
|
+
* **Simple User** (see above)
|
|
1041
|
+
* `_links`: required, object:
|
|
1042
|
+
* `comments`: required, `Link`:
|
|
1043
|
+
* `href`: required, string
|
|
1044
|
+
* `commits`: required, `Link` (see above)
|
|
1045
|
+
* `statuses`: required, `Link` (see above)
|
|
1046
|
+
* `html`: required, `Link` (see above)
|
|
1047
|
+
* `issue`: required, `Link` (see above)
|
|
1048
|
+
* `review_comments`: required, `Link` (see above)
|
|
1049
|
+
* `review_comment`: required, `Link` (see above)
|
|
1050
|
+
* `self`: required, `Link` (see above)
|
|
1051
|
+
* `author_association`: required, string, enum: `COLLABORATOR`, `CONTRIBUTOR`, `FIRST_TIMER`, `FIRST_TIME_CONTRIBUTOR`, `MANNEQUIN`, `MEMBER`, `NONE`, `OWNER`
|
|
1052
|
+
* `auto_merge`: required, `Auto merge`:
|
|
1053
|
+
* `enabled_by`: required, `Simple User` (see above)
|
|
1054
|
+
* `merge_method`: required, string, enum: `merge`, `squash`, `rebase`
|
|
1055
|
+
* `commit_title`: required, string
|
|
1056
|
+
* `commit_message`: required, string
|
|
1057
|
+
* `stack`: `Pull Request Stack`:
|
|
1058
|
+
* `base`: required, object:
|
|
1059
|
+
* `ref`: required, string
|
|
1060
|
+
* `sha`: required, string
|
|
1061
|
+
* `size`: integer
|
|
1062
|
+
* `position`: integer
|
|
1063
|
+
* `id`: integer
|
|
1064
|
+
* `number`: integer
|
|
1065
|
+
* `draft`: boolean
|
|
1066
|
+
* `linked_issues`: array of objects:
|
|
1067
|
+
* `number`: required, integer
|
|
1068
|
+
* `title`: required, string
|
|
1069
|
+
* `state`: required, string
|
|
1070
|
+
* `url`: required, string, format: uri
|
|
1071
|
+
* `html_url`: required, string, format: uri
|
|
1072
|
+
* `repository`: required, `Simple Repository`:
|
|
1073
|
+
* `id`: required, integer, format: int64
|
|
1074
|
+
* `node_id`: required, string
|
|
1075
|
+
* `name`: required, string
|
|
1076
|
+
* `full_name`: required, string
|
|
1077
|
+
* `owner`: required, `Simple User` (see above)
|
|
1078
|
+
* `private`: required, boolean
|
|
1079
|
+
* `html_url`: required, string, format: uri
|
|
1080
|
+
* `description`: required, string or null
|
|
1081
|
+
* `fork`: required, boolean
|
|
1082
|
+
* `url`: required, string, format: uri
|
|
1083
|
+
* `archive_url`: required, string
|
|
1084
|
+
* `assignees_url`: required, string
|
|
1085
|
+
* `blobs_url`: required, string
|
|
1086
|
+
* `branches_url`: required, string
|
|
1087
|
+
* `collaborators_url`: required, string
|
|
1088
|
+
* `comments_url`: required, string
|
|
1089
|
+
* `commits_url`: required, string
|
|
1090
|
+
* `compare_url`: required, string
|
|
1091
|
+
* `contents_url`: required, string
|
|
1092
|
+
* `contributors_url`: required, string, format: uri
|
|
1093
|
+
* `deployments_url`: required, string, format: uri
|
|
1094
|
+
* `downloads_url`: required, string, format: uri
|
|
1095
|
+
* `events_url`: required, string, format: uri
|
|
1096
|
+
* `forks_url`: required, string, format: uri
|
|
1097
|
+
* `git_commits_url`: required, string
|
|
1098
|
+
* `git_refs_url`: required, string
|
|
1099
|
+
* `git_tags_url`: required, string
|
|
1100
|
+
* `issue_comment_url`: required, string
|
|
1101
|
+
* `issue_events_url`: required, string
|
|
1102
|
+
* `issues_url`: required, string
|
|
1103
|
+
* `keys_url`: required, string
|
|
1104
|
+
* `labels_url`: required, string
|
|
1105
|
+
* `languages_url`: required, string, format: uri
|
|
1106
|
+
* `merges_url`: required, string, format: uri
|
|
1107
|
+
* `milestones_url`: required, string
|
|
1108
|
+
* `notifications_url`: required, string
|
|
1109
|
+
* `pulls_url`: required, string
|
|
1110
|
+
* `releases_url`: required, string
|
|
1111
|
+
* `stargazers_url`: required, string, format: uri
|
|
1112
|
+
* `statuses_url`: required, string
|
|
1113
|
+
* `subscribers_url`: required, string, format: uri
|
|
1114
|
+
* `subscription_url`: required, string, format: uri
|
|
1115
|
+
* `tags_url`: required, string, format: uri
|
|
1116
|
+
* `teams_url`: required, string, format: uri
|
|
1117
|
+
* `trees_url`: required, string
|
|
1118
|
+
* `hooks_url`: required, string, format: uri
|
|
1119
|
+
* `issue_type`: required, `Issue Type`:
|
|
1120
|
+
* `id`: required, integer
|
|
1121
|
+
* `node_id`: required, string
|
|
1122
|
+
* `name`: required, string
|
|
1123
|
+
* `description`: required, string or null
|
|
1124
|
+
* `color`: string or null, enum: `gray`, `blue`, `green`, `yellow`, `orange`, `red`, `pink`, `purple`, `null`
|
|
1125
|
+
* `created_at`: string, format: date-time
|
|
1126
|
+
* `updated_at`: string, format: date-time
|
|
1127
|
+
* `is_enabled`: boolean
|
|
1128
|
+
|
|
1129
|
+
## Update a code scanning alert
|
|
1130
|
+
|
|
1131
|
+
```
|
|
1132
|
+
PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}
|
|
1133
|
+
```
|
|
1134
|
+
|
|
1135
|
+
Updates the status of a single code scanning alert.
|
|
1136
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1137
|
+
|
|
1138
|
+
### Parameters
|
|
1139
|
+
|
|
1140
|
+
#### Headers
|
|
1141
|
+
|
|
1142
|
+
* **`accept`** (string)
|
|
1143
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1144
|
+
|
|
1145
|
+
#### Path and query parameters
|
|
1146
|
+
|
|
1147
|
+
* **`owner`** (string) (required)
|
|
1148
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1149
|
+
|
|
1150
|
+
* **`repo`** (string) (required)
|
|
1151
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1152
|
+
|
|
1153
|
+
* **`alert_number`** (integer) (required)
|
|
1154
|
+
The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
|
|
1155
|
+
|
|
1156
|
+
#### Body parameters
|
|
1157
|
+
|
|
1158
|
+
* **`state`** (string)
|
|
1159
|
+
Sets the state of the code scanning alert. You must provide dismissed\_reason when you set the state to dismissed.
|
|
1160
|
+
Can be one of: `open`, `dismissed`
|
|
1161
|
+
|
|
1162
|
+
* **`dismissed_reason`** (string or null)
|
|
1163
|
+
Required when the state is dismissed. The reason for dismissing or closing the alert.
|
|
1164
|
+
Can be one of: `false positive`, `won't fix`, `used in tests`, `mitigated`, `null`
|
|
1165
|
+
|
|
1166
|
+
* **`dismissed_comment`** (string or null)
|
|
1167
|
+
The dismissal comment associated with the dismissal of the alert.
|
|
1168
|
+
|
|
1169
|
+
* **`create_request`** (boolean)
|
|
1170
|
+
If true, attempt to create an alert dismissal request.
|
|
1171
|
+
|
|
1172
|
+
* **`assignees`** (array of strings)
|
|
1173
|
+
The list of users to assign to the code scanning alert. An empty array unassigns all previous assignees from the alert.
|
|
1174
|
+
|
|
1175
|
+
### HTTP response status codes
|
|
1176
|
+
|
|
1177
|
+
* **200** - OK
|
|
1178
|
+
|
|
1179
|
+
* **400** - Bad Request
|
|
1180
|
+
|
|
1181
|
+
* **403** - Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
|
|
1182
|
+
|
|
1183
|
+
* **404** - Resource not found
|
|
1184
|
+
|
|
1185
|
+
* **503** - Service unavailable
|
|
1186
|
+
|
|
1187
|
+
### Code examples
|
|
1188
|
+
|
|
1189
|
+
#### Example
|
|
1190
|
+
|
|
1191
|
+
**Request:**
|
|
1192
|
+
|
|
1193
|
+
```curl
|
|
1194
|
+
curl -L \
|
|
1195
|
+
-X PATCH \
|
|
1196
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/alerts/ALERT_NUMBER \
|
|
1197
|
+
-d '{
|
|
1198
|
+
"state": "dismissed",
|
|
1199
|
+
"dismissed_reason": "false positive",
|
|
1200
|
+
"dismissed_comment": "This alert is not actually correct, because there'\''s a sanitizer included in the library.",
|
|
1201
|
+
"create_request": true
|
|
1202
|
+
}'
|
|
1203
|
+
```
|
|
1204
|
+
|
|
1205
|
+
**Response schema (Status: 200):**
|
|
1206
|
+
|
|
1207
|
+
Same response schema as [Get a code scanning alert](#get-a-code-scanning-alert).
|
|
1208
|
+
|
|
1209
|
+
## Get the status of an autofix for a code scanning alert
|
|
1210
|
+
|
|
1211
|
+
```
|
|
1212
|
+
GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix
|
|
1213
|
+
```
|
|
1214
|
+
|
|
1215
|
+
Gets the status and description of an autofix for a code scanning alert on the repository's default branch.
|
|
1216
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1217
|
+
|
|
1218
|
+
### Parameters
|
|
1219
|
+
|
|
1220
|
+
#### Headers
|
|
1221
|
+
|
|
1222
|
+
* **`accept`** (string)
|
|
1223
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1224
|
+
|
|
1225
|
+
#### Path and query parameters
|
|
1226
|
+
|
|
1227
|
+
* **`owner`** (string) (required)
|
|
1228
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1229
|
+
|
|
1230
|
+
* **`repo`** (string) (required)
|
|
1231
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1232
|
+
|
|
1233
|
+
* **`alert_number`** (integer) (required)
|
|
1234
|
+
The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
|
|
1235
|
+
|
|
1236
|
+
### HTTP response status codes
|
|
1237
|
+
|
|
1238
|
+
* **200** - OK
|
|
1239
|
+
|
|
1240
|
+
* **400** - Bad Request
|
|
1241
|
+
|
|
1242
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
1243
|
+
|
|
1244
|
+
* **404** - Resource not found
|
|
1245
|
+
|
|
1246
|
+
* **500** - Internal Error
|
|
1247
|
+
|
|
1248
|
+
### Code examples
|
|
1249
|
+
|
|
1250
|
+
#### Example
|
|
1251
|
+
|
|
1252
|
+
**Request:**
|
|
1253
|
+
|
|
1254
|
+
```curl
|
|
1255
|
+
curl -L \
|
|
1256
|
+
-X GET \
|
|
1257
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/alerts/ALERT_NUMBER/autofix
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
**Response schema (Status: 200):**
|
|
1261
|
+
|
|
1262
|
+
* `status`: required, string, enum: `pending`, `error`, `success`, `outdated`
|
|
1263
|
+
* `description`: required, string or null
|
|
1264
|
+
* `started_at`: required, string, format: date-time, read-only
|
|
1265
|
+
|
|
1266
|
+
## Create an autofix for a code scanning alert
|
|
1267
|
+
|
|
1268
|
+
```
|
|
1269
|
+
POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix
|
|
1270
|
+
```
|
|
1271
|
+
|
|
1272
|
+
Creates an autofix for a code scanning alert from the repository's default branch.
|
|
1273
|
+
If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response.
|
|
1274
|
+
If an autofix already exists for a given alert, then this endpoint will return a 200 OK response.
|
|
1275
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1276
|
+
|
|
1277
|
+
### Parameters
|
|
1278
|
+
|
|
1279
|
+
#### Headers
|
|
1280
|
+
|
|
1281
|
+
* **`accept`** (string)
|
|
1282
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1283
|
+
|
|
1284
|
+
#### Path and query parameters
|
|
1285
|
+
|
|
1286
|
+
* **`owner`** (string) (required)
|
|
1287
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1288
|
+
|
|
1289
|
+
* **`repo`** (string) (required)
|
|
1290
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1291
|
+
|
|
1292
|
+
* **`alert_number`** (integer) (required)
|
|
1293
|
+
The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
|
|
1294
|
+
|
|
1295
|
+
### HTTP response status codes
|
|
1296
|
+
|
|
1297
|
+
* **200** - OK
|
|
1298
|
+
|
|
1299
|
+
* **202** - Accepted
|
|
1300
|
+
|
|
1301
|
+
* **400** - Bad Request
|
|
1302
|
+
|
|
1303
|
+
* **403** - Response if the repository is archived, if GitHub Advanced Security is not enabled for this repository or if rate limit is exceeded
|
|
1304
|
+
|
|
1305
|
+
* **404** - Resource not found
|
|
1306
|
+
|
|
1307
|
+
* **422** - Unprocessable Entity
|
|
1308
|
+
|
|
1309
|
+
* **500** - Internal Error
|
|
1310
|
+
|
|
1311
|
+
### Code examples
|
|
1312
|
+
|
|
1313
|
+
#### Example 1: Status Code 200
|
|
1314
|
+
|
|
1315
|
+
**Request:**
|
|
1316
|
+
|
|
1317
|
+
```curl
|
|
1318
|
+
curl -L \
|
|
1319
|
+
-X POST \
|
|
1320
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/alerts/ALERT_NUMBER/autofix
|
|
1321
|
+
```
|
|
1322
|
+
|
|
1323
|
+
**Response schema (Status: 200):**
|
|
1324
|
+
|
|
1325
|
+
Same response schema as [Get the status of an autofix for a code scanning alert](#get-the-status-of-an-autofix-for-a-code-scanning-alert).
|
|
1326
|
+
|
|
1327
|
+
#### Example 2: Status Code 202
|
|
1328
|
+
|
|
1329
|
+
**Request:**
|
|
1330
|
+
|
|
1331
|
+
```curl
|
|
1332
|
+
curl -L \
|
|
1333
|
+
-X POST \
|
|
1334
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/alerts/ALERT_NUMBER/autofix
|
|
1335
|
+
```
|
|
1336
|
+
|
|
1337
|
+
**Response schema (Status: 202):**
|
|
1338
|
+
|
|
1339
|
+
Same response schema as [Get the status of an autofix for a code scanning alert](#get-the-status-of-an-autofix-for-a-code-scanning-alert).
|
|
1340
|
+
|
|
1341
|
+
## Commit an autofix for a code scanning alert
|
|
1342
|
+
|
|
1343
|
+
```
|
|
1344
|
+
POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits
|
|
1345
|
+
```
|
|
1346
|
+
|
|
1347
|
+
Commits an autofix for a code scanning alert from the repository's default branch.
|
|
1348
|
+
If an autofix is committed as a result of this request, then this endpoint will return a 201 Created response.
|
|
1349
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1350
|
+
|
|
1351
|
+
### Parameters
|
|
1352
|
+
|
|
1353
|
+
#### Headers
|
|
1354
|
+
|
|
1355
|
+
* **`accept`** (string)
|
|
1356
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1357
|
+
|
|
1358
|
+
#### Path and query parameters
|
|
1359
|
+
|
|
1360
|
+
* **`owner`** (string) (required)
|
|
1361
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1362
|
+
|
|
1363
|
+
* **`repo`** (string) (required)
|
|
1364
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1365
|
+
|
|
1366
|
+
* **`alert_number`** (integer) (required)
|
|
1367
|
+
The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
|
|
1368
|
+
|
|
1369
|
+
#### Body parameters
|
|
1370
|
+
|
|
1371
|
+
* **`target_ref`** (string)
|
|
1372
|
+
The Git reference of target branch for the commit. Branch needs to already exist. For more information, see "Git References" in the Git documentation.
|
|
1373
|
+
|
|
1374
|
+
* **`message`** (string)
|
|
1375
|
+
Commit message to be used.
|
|
1376
|
+
|
|
1377
|
+
### HTTP response status codes
|
|
1378
|
+
|
|
1379
|
+
* **201** - Created
|
|
1380
|
+
|
|
1381
|
+
* **400** - Bad Request
|
|
1382
|
+
|
|
1383
|
+
* **403** - Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
|
|
1384
|
+
|
|
1385
|
+
* **404** - Resource not found
|
|
1386
|
+
|
|
1387
|
+
* **422** - Unprocessable Entity
|
|
1388
|
+
|
|
1389
|
+
* **503** - Service unavailable
|
|
1390
|
+
|
|
1391
|
+
### Code examples
|
|
1392
|
+
|
|
1393
|
+
#### Example
|
|
1394
|
+
|
|
1395
|
+
**Request:**
|
|
1396
|
+
|
|
1397
|
+
```curl
|
|
1398
|
+
curl -L \
|
|
1399
|
+
-X POST \
|
|
1400
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/alerts/ALERT_NUMBER/autofix/commits \
|
|
1401
|
+
-d '{
|
|
1402
|
+
"target_ref": "refs/heads/fix-bug",
|
|
1403
|
+
"message": "Let'\''s fix this 🪲!"
|
|
1404
|
+
}'
|
|
1405
|
+
```
|
|
1406
|
+
|
|
1407
|
+
**Response schema (Status: 201):**
|
|
1408
|
+
|
|
1409
|
+
* `target_ref`: string
|
|
1410
|
+
* `sha`: string
|
|
1411
|
+
|
|
1412
|
+
## List instances of a code scanning alert
|
|
1413
|
+
|
|
1414
|
+
```
|
|
1415
|
+
GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances
|
|
1416
|
+
```
|
|
1417
|
+
|
|
1418
|
+
Lists all instances of the specified code scanning alert.
|
|
1419
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1420
|
+
|
|
1421
|
+
### Parameters
|
|
1422
|
+
|
|
1423
|
+
#### Headers
|
|
1424
|
+
|
|
1425
|
+
* **`accept`** (string)
|
|
1426
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1427
|
+
|
|
1428
|
+
#### Path and query parameters
|
|
1429
|
+
|
|
1430
|
+
* **`owner`** (string) (required)
|
|
1431
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1432
|
+
|
|
1433
|
+
* **`repo`** (string) (required)
|
|
1434
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1435
|
+
|
|
1436
|
+
* **`alert_number`** (integer) (required)
|
|
1437
|
+
The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
|
|
1438
|
+
|
|
1439
|
+
* **`page`** (integer)
|
|
1440
|
+
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
|
|
1441
|
+
Default: `1`
|
|
1442
|
+
|
|
1443
|
+
* **`per_page`** (integer)
|
|
1444
|
+
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
|
|
1445
|
+
Default: `30`
|
|
1446
|
+
|
|
1447
|
+
* **`ref`** (string)
|
|
1448
|
+
The Git reference for the results you want to list. The ref for a branch can be formatted either as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge.
|
|
1449
|
+
|
|
1450
|
+
* **`pr`** (integer)
|
|
1451
|
+
The number of the pull request for the results you want to list.
|
|
1452
|
+
|
|
1453
|
+
### HTTP response status codes
|
|
1454
|
+
|
|
1455
|
+
* **200** - OK
|
|
1456
|
+
|
|
1457
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
1458
|
+
|
|
1459
|
+
* **404** - Resource not found
|
|
1460
|
+
|
|
1461
|
+
* **503** - Service unavailable
|
|
1462
|
+
|
|
1463
|
+
### Code examples
|
|
1464
|
+
|
|
1465
|
+
#### Example
|
|
1466
|
+
|
|
1467
|
+
**Request:**
|
|
1468
|
+
|
|
1469
|
+
```curl
|
|
1470
|
+
curl -L \
|
|
1471
|
+
-X GET \
|
|
1472
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/alerts/ALERT_NUMBER/instances
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
**Response schema (Status: 200):**
|
|
1476
|
+
|
|
1477
|
+
Array of objects:
|
|
1478
|
+
|
|
1479
|
+
* `ref`: string
|
|
1480
|
+
* `analysis_key`: string
|
|
1481
|
+
* `environment`: string
|
|
1482
|
+
* `category`: string
|
|
1483
|
+
* `state`: string or null, enum: `open`, `fixed`, `null`
|
|
1484
|
+
* `commit_sha`: string
|
|
1485
|
+
* `message`: object:
|
|
1486
|
+
* `text`: string
|
|
1487
|
+
* `location`: object:
|
|
1488
|
+
* `path`: string
|
|
1489
|
+
* `start_line`: integer
|
|
1490
|
+
* `end_line`: integer
|
|
1491
|
+
* `start_column`: integer
|
|
1492
|
+
* `end_column`: integer
|
|
1493
|
+
* `html_url`: string
|
|
1494
|
+
* `classifications`: array of string or null, enum: `source`, `generated`, `test`, `library`, `null`
|
|
1495
|
+
|
|
1496
|
+
## List code scanning analyses for a repository
|
|
1497
|
+
|
|
1498
|
+
```
|
|
1499
|
+
GET /repos/{owner}/{repo}/code-scanning/analyses
|
|
1500
|
+
```
|
|
1501
|
+
|
|
1502
|
+
Lists the details of all code scanning analyses for a repository,
|
|
1503
|
+
starting with the most recent.
|
|
1504
|
+
The response is paginated and you can use the page and per\_page parameters
|
|
1505
|
+
to list the analyses you're interested in.
|
|
1506
|
+
By default 30 analyses are listed per page.
|
|
1507
|
+
The rules\_count field in the response give the number of rules
|
|
1508
|
+
that were run in the analysis.
|
|
1509
|
+
For very old analyses this data is not available,
|
|
1510
|
+
and 0 is returned in this field.
|
|
1511
|
+
Warning
|
|
1512
|
+
|
|
1513
|
+
Closing down notice: The tool\_name field is closing down and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the tool field.
|
|
1514
|
+
|
|
1515
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1516
|
+
|
|
1517
|
+
### Parameters
|
|
1518
|
+
|
|
1519
|
+
#### Headers
|
|
1520
|
+
|
|
1521
|
+
* **`accept`** (string)
|
|
1522
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1523
|
+
|
|
1524
|
+
#### Path and query parameters
|
|
1525
|
+
|
|
1526
|
+
* **`owner`** (string) (required)
|
|
1527
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1528
|
+
|
|
1529
|
+
* **`repo`** (string) (required)
|
|
1530
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1531
|
+
|
|
1532
|
+
* **`tool_name`** (string)
|
|
1533
|
+
The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either tool\_name or tool\_guid, but not both.
|
|
1534
|
+
|
|
1535
|
+
* **`tool_guid`** (string or null)
|
|
1536
|
+
The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either tool\_guid or tool\_name, but not both.
|
|
1537
|
+
|
|
1538
|
+
* **`page`** (integer)
|
|
1539
|
+
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
|
|
1540
|
+
Default: `1`
|
|
1541
|
+
|
|
1542
|
+
* **`per_page`** (integer)
|
|
1543
|
+
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
|
|
1544
|
+
Default: `30`
|
|
1545
|
+
|
|
1546
|
+
* **`pr`** (integer)
|
|
1547
|
+
The number of the pull request for the results you want to list.
|
|
1548
|
+
|
|
1549
|
+
* **`ref`** (string)
|
|
1550
|
+
The Git reference for the analyses you want to list. The ref for a branch can be formatted either as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge.
|
|
1551
|
+
|
|
1552
|
+
* **`sarif_id`** (string)
|
|
1553
|
+
Filter analyses belonging to the same SARIF upload.
|
|
1554
|
+
|
|
1555
|
+
* **`direction`** (string)
|
|
1556
|
+
The direction to sort the results by.
|
|
1557
|
+
Default: `desc`
|
|
1558
|
+
Can be one of: `asc`, `desc`
|
|
1559
|
+
|
|
1560
|
+
* **`sort`** (string)
|
|
1561
|
+
The property by which to sort the results.
|
|
1562
|
+
Default: `created`
|
|
1563
|
+
Can be one of: `created`
|
|
1564
|
+
|
|
1565
|
+
### HTTP response status codes
|
|
1566
|
+
|
|
1567
|
+
* **200** - OK
|
|
1568
|
+
|
|
1569
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
1570
|
+
|
|
1571
|
+
* **404** - Resource not found
|
|
1572
|
+
|
|
1573
|
+
* **503** - Service unavailable
|
|
1574
|
+
|
|
1575
|
+
### Code examples
|
|
1576
|
+
|
|
1577
|
+
#### Example
|
|
1578
|
+
|
|
1579
|
+
**Request:**
|
|
1580
|
+
|
|
1581
|
+
```curl
|
|
1582
|
+
curl -L \
|
|
1583
|
+
-X GET \
|
|
1584
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/analyses
|
|
1585
|
+
```
|
|
1586
|
+
|
|
1587
|
+
**Response schema (Status: 200):**
|
|
1588
|
+
|
|
1589
|
+
Array of objects:
|
|
1590
|
+
|
|
1591
|
+
* `ref`: required, string
|
|
1592
|
+
* `commit_sha`: required, string, minLength: 40, maxLength: 64, pattern: `^([0-9a-fA-F]{40}(?:[0-9a-fA-F]{24})?)$`
|
|
1593
|
+
* `analysis_key`: required, string
|
|
1594
|
+
* `environment`: required, string
|
|
1595
|
+
* `category`: string
|
|
1596
|
+
* `error`: required, string
|
|
1597
|
+
* `created_at`: required, string, format: date-time, read-only
|
|
1598
|
+
* `results_count`: required, integer
|
|
1599
|
+
* `rules_count`: required, integer
|
|
1600
|
+
* `id`: required, integer
|
|
1601
|
+
* `url`: required, string, format: uri, read-only
|
|
1602
|
+
* `sarif_id`: required, string
|
|
1603
|
+
* `tool`: required, object:
|
|
1604
|
+
* `name`: string
|
|
1605
|
+
* `version`: string or null
|
|
1606
|
+
* `guid`: string or null
|
|
1607
|
+
* `deletable`: required, boolean
|
|
1608
|
+
* `warning`: required, string
|
|
1609
|
+
|
|
1610
|
+
## Get a code scanning analysis for a repository
|
|
1611
|
+
|
|
1612
|
+
```
|
|
1613
|
+
GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}
|
|
1614
|
+
```
|
|
1615
|
+
|
|
1616
|
+
Gets a specified code scanning analysis for a repository.
|
|
1617
|
+
The default JSON response contains fields that describe the analysis.
|
|
1618
|
+
This includes the Git reference and commit SHA to which the analysis relates,
|
|
1619
|
+
the datetime of the analysis, the name of the code scanning tool,
|
|
1620
|
+
and the number of alerts.
|
|
1621
|
+
The rules\_count field in the default response give the number of rules
|
|
1622
|
+
that were run in the analysis.
|
|
1623
|
+
For very old analyses this data is not available,
|
|
1624
|
+
and 0 is returned in this field.
|
|
1625
|
+
This endpoint supports the following custom media types. For more information, see "Media types."
|
|
1626
|
+
|
|
1627
|
+
application/sarif+json: Instead of returning a summary of the analysis, this endpoint returns a subset of the analysis data that was uploaded. The data is formatted as SARIF version 2.1.0. It also returns additional data such as the github/alertNumber and github/alertUrl properties.
|
|
1628
|
+
|
|
1629
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1630
|
+
|
|
1631
|
+
### Parameters
|
|
1632
|
+
|
|
1633
|
+
#### Headers
|
|
1634
|
+
|
|
1635
|
+
* **`accept`** (string)
|
|
1636
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1637
|
+
|
|
1638
|
+
#### Path and query parameters
|
|
1639
|
+
|
|
1640
|
+
* **`owner`** (string) (required)
|
|
1641
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1642
|
+
|
|
1643
|
+
* **`repo`** (string) (required)
|
|
1644
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1645
|
+
|
|
1646
|
+
* **`analysis_id`** (integer) (required)
|
|
1647
|
+
The ID of the analysis, as returned from the GET /repos/{owner}/{repo}/code-scanning/analyses operation.
|
|
1648
|
+
|
|
1649
|
+
### HTTP response status codes
|
|
1650
|
+
|
|
1651
|
+
* **200** - OK
|
|
1652
|
+
|
|
1653
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
1654
|
+
|
|
1655
|
+
* **404** - Resource not found
|
|
1656
|
+
|
|
1657
|
+
* **422** - Response if analysis could not be processed
|
|
1658
|
+
|
|
1659
|
+
* **503** - Service unavailable
|
|
1660
|
+
|
|
1661
|
+
### Code examples
|
|
1662
|
+
|
|
1663
|
+
#### Example 1: Status Code 200
|
|
1664
|
+
|
|
1665
|
+
**Request:**
|
|
1666
|
+
|
|
1667
|
+
```curl
|
|
1668
|
+
curl -L \
|
|
1669
|
+
-X GET \
|
|
1670
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/analyses/ANALYSIS_ID
|
|
1671
|
+
```
|
|
1672
|
+
|
|
1673
|
+
**Response schema (Status: 200):**
|
|
1674
|
+
|
|
1675
|
+
* `ref`: required, string
|
|
1676
|
+
* `commit_sha`: required, string, minLength: 40, maxLength: 64, pattern: `^([0-9a-fA-F]{40}(?:[0-9a-fA-F]{24})?)$`
|
|
1677
|
+
* `analysis_key`: required, string
|
|
1678
|
+
* `environment`: required, string
|
|
1679
|
+
* `category`: string
|
|
1680
|
+
* `error`: required, string
|
|
1681
|
+
* `created_at`: required, string, format: date-time, read-only
|
|
1682
|
+
* `results_count`: required, integer
|
|
1683
|
+
* `rules_count`: required, integer
|
|
1684
|
+
* `id`: required, integer
|
|
1685
|
+
* `url`: required, string, format: uri, read-only
|
|
1686
|
+
* `sarif_id`: required, string
|
|
1687
|
+
* `tool`: required, object:
|
|
1688
|
+
* `name`: string
|
|
1689
|
+
* `version`: string or null
|
|
1690
|
+
* `guid`: string or null
|
|
1691
|
+
* `deletable`: required, boolean
|
|
1692
|
+
* `warning`: required, string
|
|
1693
|
+
|
|
1694
|
+
#### Example 2: Status Code 200
|
|
1695
|
+
|
|
1696
|
+
**Request:**
|
|
1697
|
+
|
|
1698
|
+
```curl
|
|
1699
|
+
curl -L \
|
|
1700
|
+
-X GET \
|
|
1701
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/analyses/ANALYSIS_ID \
|
|
1702
|
+
-H "Accept: application/sarif+json"
|
|
1703
|
+
```
|
|
1704
|
+
|
|
1705
|
+
**Response schema (Status: 200):**
|
|
1706
|
+
|
|
1707
|
+
object, additional properties allowed
|
|
1708
|
+
|
|
1709
|
+
## Delete a code scanning analysis from a repository
|
|
1710
|
+
|
|
1711
|
+
```
|
|
1712
|
+
DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}
|
|
1713
|
+
```
|
|
1714
|
+
|
|
1715
|
+
Deletes a specified code scanning analysis from a repository.
|
|
1716
|
+
You can delete one analysis at a time.
|
|
1717
|
+
To delete a series of analyses, start with the most recent analysis and work backwards.
|
|
1718
|
+
Conceptually, the process is similar to the undo function in a text editor.
|
|
1719
|
+
When you list the analyses for a repository,
|
|
1720
|
+
one or more will be identified as deletable in the response:
|
|
1721
|
+
"deletable": true
|
|
1722
|
+
|
|
1723
|
+
An analysis is deletable when it's the most recent in a set of analyses.
|
|
1724
|
+
Typically, a repository will have multiple sets of analyses
|
|
1725
|
+
for each enabled code scanning tool,
|
|
1726
|
+
where a set is determined by a unique combination of analysis values:
|
|
1727
|
+
|
|
1728
|
+
ref
|
|
1729
|
+
tool
|
|
1730
|
+
category
|
|
1731
|
+
|
|
1732
|
+
If you attempt to delete an analysis that is not the most recent in a set,
|
|
1733
|
+
you'll get a 400 response with the message:
|
|
1734
|
+
Analysis specified is not deletable.
|
|
1735
|
+
|
|
1736
|
+
The response from a successful DELETE operation provides you with
|
|
1737
|
+
two alternative URLs for deleting the next analysis in the set:
|
|
1738
|
+
next\_analysis\_url and confirm\_delete\_url.
|
|
1739
|
+
Use the next\_analysis\_url URL if you want to avoid accidentally deleting the final analysis
|
|
1740
|
+
in a set. This is a useful option if you want to preserve at least one analysis
|
|
1741
|
+
for the specified tool in your repository.
|
|
1742
|
+
Use the confirm\_delete\_url URL if you are content to remove all analyses for a tool.
|
|
1743
|
+
When you delete the last analysis in a set, the value of next\_analysis\_url and confirm\_delete\_url
|
|
1744
|
+
in the 200 response is null.
|
|
1745
|
+
As an example of the deletion process,
|
|
1746
|
+
let's imagine that you added a workflow that configured a particular code scanning tool
|
|
1747
|
+
to analyze the code in a repository. This tool has added 15 analyses:
|
|
1748
|
+
10 on the default branch, and another 5 on a topic branch.
|
|
1749
|
+
You therefore have two separate sets of analyses for this tool.
|
|
1750
|
+
You've now decided that you want to remove all of the analyses for the tool.
|
|
1751
|
+
To do this you must make 15 separate deletion requests.
|
|
1752
|
+
To start, you must find an analysis that's identified as deletable.
|
|
1753
|
+
Each set of analyses always has one that's identified as deletable.
|
|
1754
|
+
Having found the deletable analysis for one of the two sets,
|
|
1755
|
+
delete this analysis and then continue deleting the next analysis in the set until they're all deleted.
|
|
1756
|
+
Then repeat the process for the second set.
|
|
1757
|
+
The procedure therefore consists of a nested loop:
|
|
1758
|
+
Outer loop:
|
|
1759
|
+
|
|
1760
|
+
List the analyses for the repository, filtered by tool.
|
|
1761
|
+
|
|
1762
|
+
Parse this list to find a deletable analysis. If found:
|
|
1763
|
+
Inner loop:
|
|
1764
|
+
|
|
1765
|
+
Delete the identified analysis.
|
|
1766
|
+
Parse the response for the value of confirm\_delete\_url and, if found, use this in the next iteration.
|
|
1767
|
+
|
|
1768
|
+
The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the confirm\_delete\_url value. Alternatively, you could use the next\_analysis\_url value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
|
|
1769
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1770
|
+
|
|
1771
|
+
### Parameters
|
|
1772
|
+
|
|
1773
|
+
#### Headers
|
|
1774
|
+
|
|
1775
|
+
* **`accept`** (string)
|
|
1776
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1777
|
+
|
|
1778
|
+
#### Path and query parameters
|
|
1779
|
+
|
|
1780
|
+
* **`owner`** (string) (required)
|
|
1781
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1782
|
+
|
|
1783
|
+
* **`repo`** (string) (required)
|
|
1784
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1785
|
+
|
|
1786
|
+
* **`analysis_id`** (integer) (required)
|
|
1787
|
+
The ID of the analysis, as returned from the GET /repos/{owner}/{repo}/code-scanning/analyses operation.
|
|
1788
|
+
|
|
1789
|
+
* **`confirm_delete`** (string or null)
|
|
1790
|
+
Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to true, you'll get a 400 response with the message: Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm\_delete.
|
|
1791
|
+
|
|
1792
|
+
### HTTP response status codes
|
|
1793
|
+
|
|
1794
|
+
* **200** - OK
|
|
1795
|
+
|
|
1796
|
+
* **400** - Bad Request
|
|
1797
|
+
|
|
1798
|
+
* **403** - Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
|
|
1799
|
+
|
|
1800
|
+
* **404** - Resource not found
|
|
1801
|
+
|
|
1802
|
+
* **503** - Service unavailable
|
|
1803
|
+
|
|
1804
|
+
### Code examples
|
|
1805
|
+
|
|
1806
|
+
#### Example
|
|
1807
|
+
|
|
1808
|
+
**Request:**
|
|
1809
|
+
|
|
1810
|
+
```curl
|
|
1811
|
+
curl -L \
|
|
1812
|
+
-X DELETE \
|
|
1813
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/analyses/ANALYSIS_ID
|
|
1814
|
+
```
|
|
1815
|
+
|
|
1816
|
+
**Response schema (Status: 200):**
|
|
1817
|
+
|
|
1818
|
+
* `next_analysis_url`: required, string or null, format: uri, read-only
|
|
1819
|
+
* `confirm_delete_url`: required, string or null, format: uri, read-only
|
|
1820
|
+
|
|
1821
|
+
## List CodeQL databases for a repository
|
|
1822
|
+
|
|
1823
|
+
```
|
|
1824
|
+
GET /repos/{owner}/{repo}/code-scanning/codeql/databases
|
|
1825
|
+
```
|
|
1826
|
+
|
|
1827
|
+
Lists the CodeQL databases that are available in a repository.
|
|
1828
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1829
|
+
|
|
1830
|
+
### Parameters
|
|
1831
|
+
|
|
1832
|
+
#### Headers
|
|
1833
|
+
|
|
1834
|
+
* **`accept`** (string)
|
|
1835
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1836
|
+
|
|
1837
|
+
#### Path and query parameters
|
|
1838
|
+
|
|
1839
|
+
* **`owner`** (string) (required)
|
|
1840
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1841
|
+
|
|
1842
|
+
* **`repo`** (string) (required)
|
|
1843
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1844
|
+
|
|
1845
|
+
### HTTP response status codes
|
|
1846
|
+
|
|
1847
|
+
* **200** - OK
|
|
1848
|
+
|
|
1849
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
1850
|
+
|
|
1851
|
+
* **404** - Resource not found
|
|
1852
|
+
|
|
1853
|
+
* **503** - Service unavailable
|
|
1854
|
+
|
|
1855
|
+
### Code examples
|
|
1856
|
+
|
|
1857
|
+
#### Example
|
|
1858
|
+
|
|
1859
|
+
**Request:**
|
|
1860
|
+
|
|
1861
|
+
```curl
|
|
1862
|
+
curl -L \
|
|
1863
|
+
-X GET \
|
|
1864
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/codeql/databases
|
|
1865
|
+
```
|
|
1866
|
+
|
|
1867
|
+
**Response schema (Status: 200):**
|
|
1868
|
+
|
|
1869
|
+
Array of `CodeQL Database`:
|
|
1870
|
+
|
|
1871
|
+
* `id`: required, integer
|
|
1872
|
+
* `name`: required, string
|
|
1873
|
+
* `language`: required, string
|
|
1874
|
+
* `uploader`: required, `Simple User`:
|
|
1875
|
+
* `name`: string or null
|
|
1876
|
+
* `email`: string or null
|
|
1877
|
+
* `login`: required, string
|
|
1878
|
+
* `id`: required, integer, format: int64
|
|
1879
|
+
* `node_id`: required, string
|
|
1880
|
+
* `avatar_url`: required, string, format: uri
|
|
1881
|
+
* `gravatar_id`: required, string or null
|
|
1882
|
+
* `url`: required, string, format: uri
|
|
1883
|
+
* `html_url`: required, string, format: uri
|
|
1884
|
+
* `followers_url`: required, string, format: uri
|
|
1885
|
+
* `following_url`: required, string
|
|
1886
|
+
* `gists_url`: required, string
|
|
1887
|
+
* `starred_url`: required, string
|
|
1888
|
+
* `subscriptions_url`: required, string, format: uri
|
|
1889
|
+
* `organizations_url`: required, string, format: uri
|
|
1890
|
+
* `repos_url`: required, string, format: uri
|
|
1891
|
+
* `events_url`: required, string
|
|
1892
|
+
* `received_events_url`: required, string, format: uri
|
|
1893
|
+
* `type`: required, string
|
|
1894
|
+
* `site_admin`: required, boolean
|
|
1895
|
+
* `starred_at`: string
|
|
1896
|
+
* `user_view_type`: string
|
|
1897
|
+
* `content_type`: required, string
|
|
1898
|
+
* `size`: required, integer
|
|
1899
|
+
* `created_at`: required, string, format: date-time
|
|
1900
|
+
* `updated_at`: required, string, format: date-time
|
|
1901
|
+
* `url`: required, string, format: uri
|
|
1902
|
+
* `commit_oid`: string or null
|
|
1903
|
+
|
|
1904
|
+
## Get a CodeQL database for a repository
|
|
1905
|
+
|
|
1906
|
+
```
|
|
1907
|
+
GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}
|
|
1908
|
+
```
|
|
1909
|
+
|
|
1910
|
+
Gets a CodeQL database for a language in a repository.
|
|
1911
|
+
By default this endpoint returns JSON metadata about the CodeQL database. To
|
|
1912
|
+
download the CodeQL database binary content, set the Accept header of the request
|
|
1913
|
+
to application/zip, and make sure
|
|
1914
|
+
your HTTP client is configured to follow redirects or use the Location header
|
|
1915
|
+
to make a second request to get the redirect URL.
|
|
1916
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
1917
|
+
|
|
1918
|
+
### Parameters
|
|
1919
|
+
|
|
1920
|
+
#### Headers
|
|
1921
|
+
|
|
1922
|
+
* **`accept`** (string)
|
|
1923
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
1924
|
+
|
|
1925
|
+
#### Path and query parameters
|
|
1926
|
+
|
|
1927
|
+
* **`owner`** (string) (required)
|
|
1928
|
+
The account owner of the repository. The name is not case sensitive.
|
|
1929
|
+
|
|
1930
|
+
* **`repo`** (string) (required)
|
|
1931
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
1932
|
+
|
|
1933
|
+
* **`language`** (string) (required)
|
|
1934
|
+
The language of the CodeQL database.
|
|
1935
|
+
|
|
1936
|
+
### HTTP response status codes
|
|
1937
|
+
|
|
1938
|
+
* **200** - OK
|
|
1939
|
+
|
|
1940
|
+
* **302** - Found
|
|
1941
|
+
|
|
1942
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
1943
|
+
|
|
1944
|
+
* **404** - Resource not found
|
|
1945
|
+
|
|
1946
|
+
* **503** - Service unavailable
|
|
1947
|
+
|
|
1948
|
+
### Code examples
|
|
1949
|
+
|
|
1950
|
+
#### Example
|
|
1951
|
+
|
|
1952
|
+
**Request:**
|
|
1953
|
+
|
|
1954
|
+
```curl
|
|
1955
|
+
curl -L \
|
|
1956
|
+
-X GET \
|
|
1957
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/codeql/databases/LANGUAGE
|
|
1958
|
+
```
|
|
1959
|
+
|
|
1960
|
+
**Response schema (Status: 200):**
|
|
1961
|
+
|
|
1962
|
+
* `id`: required, integer
|
|
1963
|
+
* `name`: required, string
|
|
1964
|
+
* `language`: required, string
|
|
1965
|
+
* `uploader`: required, `Simple User`:
|
|
1966
|
+
* `name`: string or null
|
|
1967
|
+
* `email`: string or null
|
|
1968
|
+
* `login`: required, string
|
|
1969
|
+
* `id`: required, integer, format: int64
|
|
1970
|
+
* `node_id`: required, string
|
|
1971
|
+
* `avatar_url`: required, string, format: uri
|
|
1972
|
+
* `gravatar_id`: required, string or null
|
|
1973
|
+
* `url`: required, string, format: uri
|
|
1974
|
+
* `html_url`: required, string, format: uri
|
|
1975
|
+
* `followers_url`: required, string, format: uri
|
|
1976
|
+
* `following_url`: required, string
|
|
1977
|
+
* `gists_url`: required, string
|
|
1978
|
+
* `starred_url`: required, string
|
|
1979
|
+
* `subscriptions_url`: required, string, format: uri
|
|
1980
|
+
* `organizations_url`: required, string, format: uri
|
|
1981
|
+
* `repos_url`: required, string, format: uri
|
|
1982
|
+
* `events_url`: required, string
|
|
1983
|
+
* `received_events_url`: required, string, format: uri
|
|
1984
|
+
* `type`: required, string
|
|
1985
|
+
* `site_admin`: required, boolean
|
|
1986
|
+
* `starred_at`: string
|
|
1987
|
+
* `user_view_type`: string
|
|
1988
|
+
* `content_type`: required, string
|
|
1989
|
+
* `size`: required, integer
|
|
1990
|
+
* `created_at`: required, string, format: date-time
|
|
1991
|
+
* `updated_at`: required, string, format: date-time
|
|
1992
|
+
* `url`: required, string, format: uri
|
|
1993
|
+
* `commit_oid`: string or null
|
|
1994
|
+
|
|
1995
|
+
## Delete a CodeQL database
|
|
1996
|
+
|
|
1997
|
+
```
|
|
1998
|
+
DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}
|
|
1999
|
+
```
|
|
2000
|
+
|
|
2001
|
+
Deletes a CodeQL database for a language in a repository.
|
|
2002
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
2003
|
+
|
|
2004
|
+
### Parameters
|
|
2005
|
+
|
|
2006
|
+
#### Headers
|
|
2007
|
+
|
|
2008
|
+
* **`accept`** (string)
|
|
2009
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
2010
|
+
|
|
2011
|
+
#### Path and query parameters
|
|
2012
|
+
|
|
2013
|
+
* **`owner`** (string) (required)
|
|
2014
|
+
The account owner of the repository. The name is not case sensitive.
|
|
2015
|
+
|
|
2016
|
+
* **`repo`** (string) (required)
|
|
2017
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
2018
|
+
|
|
2019
|
+
* **`language`** (string) (required)
|
|
2020
|
+
The language of the CodeQL database.
|
|
2021
|
+
|
|
2022
|
+
### HTTP response status codes
|
|
2023
|
+
|
|
2024
|
+
* **204** - No Content
|
|
2025
|
+
|
|
2026
|
+
* **403** - Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
|
|
2027
|
+
|
|
2028
|
+
* **404** - Resource not found
|
|
2029
|
+
|
|
2030
|
+
* **503** - Service unavailable
|
|
2031
|
+
|
|
2032
|
+
### Code examples
|
|
2033
|
+
|
|
2034
|
+
#### Example
|
|
2035
|
+
|
|
2036
|
+
**Request:**
|
|
2037
|
+
|
|
2038
|
+
```curl
|
|
2039
|
+
curl -L \
|
|
2040
|
+
-X DELETE \
|
|
2041
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/codeql/databases/LANGUAGE
|
|
2042
|
+
```
|
|
2043
|
+
|
|
2044
|
+
**Response schema (Status: 204):**
|
|
2045
|
+
|
|
2046
|
+
## Create a CodeQL variant analysis
|
|
2047
|
+
|
|
2048
|
+
```
|
|
2049
|
+
POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses
|
|
2050
|
+
```
|
|
2051
|
+
|
|
2052
|
+
Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.
|
|
2053
|
+
Get started by learning more about running CodeQL queries at scale with Multi-Repository Variant Analysis.
|
|
2054
|
+
Use the owner and repo parameters in the URL to specify the controller repository that
|
|
2055
|
+
will be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.
|
|
2056
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
|
|
2057
|
+
|
|
2058
|
+
### Parameters
|
|
2059
|
+
|
|
2060
|
+
#### Headers
|
|
2061
|
+
|
|
2062
|
+
* **`accept`** (string)
|
|
2063
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
2064
|
+
|
|
2065
|
+
#### Path and query parameters
|
|
2066
|
+
|
|
2067
|
+
* **`owner`** (string) (required)
|
|
2068
|
+
The account owner of the repository. The name is not case sensitive.
|
|
2069
|
+
|
|
2070
|
+
* **`repo`** (string) (required)
|
|
2071
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
2072
|
+
|
|
2073
|
+
#### Body parameters
|
|
2074
|
+
|
|
2075
|
+
* **`language`** (string) (required)
|
|
2076
|
+
The language targeted by the CodeQL query
|
|
2077
|
+
Can be one of: `actions`, `cpp`, `csharp`, `go`, `java`, `javascript`, `python`, `ruby`, `rust`, `swift`
|
|
2078
|
+
|
|
2079
|
+
* **`query_pack`** (string) (required)
|
|
2080
|
+
A Base64-encoded tarball containing a CodeQL query and all its dependencies
|
|
2081
|
+
|
|
2082
|
+
* **`repositories`** (array of strings)
|
|
2083
|
+
List of repository names (in the form owner/repo-name) to run the query against. Precisely one property from repositories, repository\_lists and repository\_owners is required.
|
|
2084
|
+
|
|
2085
|
+
* **`repository_lists`** (array of strings)
|
|
2086
|
+
List of repository lists to run the query against. Precisely one property from repositories, repository\_lists and repository\_owners is required.
|
|
2087
|
+
|
|
2088
|
+
* **`repository_owners`** (array of strings)
|
|
2089
|
+
List of organization or user names whose repositories the query should be run against. Precisely one property from repositories, repository\_lists and repository\_owners is required.
|
|
2090
|
+
|
|
2091
|
+
### HTTP response status codes
|
|
2092
|
+
|
|
2093
|
+
* **201** - Variant analysis submitted for processing
|
|
2094
|
+
|
|
2095
|
+
* **404** - Resource not found
|
|
2096
|
+
|
|
2097
|
+
* **422** - Unable to process variant analysis submission
|
|
2098
|
+
|
|
2099
|
+
* **503** - Service unavailable
|
|
2100
|
+
|
|
2101
|
+
### Code examples
|
|
2102
|
+
|
|
2103
|
+
#### Using the "repositories" field. "query\_pack" is abridged for brevity.
|
|
2104
|
+
|
|
2105
|
+
**Request:**
|
|
2106
|
+
|
|
2107
|
+
```curl
|
|
2108
|
+
curl -L \
|
|
2109
|
+
-X POST \
|
|
2110
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/codeql/variant-analyses \
|
|
2111
|
+
-d '{
|
|
2112
|
+
"language": "csharp",
|
|
2113
|
+
"query_pack": "aGVsbG8=",
|
|
2114
|
+
"repositories": [
|
|
2115
|
+
"octocat/Hello-World",
|
|
2116
|
+
"octocat/example"
|
|
2117
|
+
]
|
|
2118
|
+
}'
|
|
2119
|
+
```
|
|
2120
|
+
|
|
2121
|
+
**Response schema (Status: 201):**
|
|
2122
|
+
|
|
2123
|
+
* `id`: required, integer
|
|
2124
|
+
* `controller_repo`: required, `Simple Repository`:
|
|
2125
|
+
* `id`: required, integer, format: int64
|
|
2126
|
+
* `node_id`: required, string
|
|
2127
|
+
* `name`: required, string
|
|
2128
|
+
* `full_name`: required, string
|
|
2129
|
+
* `owner`: required, `Simple User`:
|
|
2130
|
+
* `name`: string or null
|
|
2131
|
+
* `email`: string or null
|
|
2132
|
+
* `login`: required, string
|
|
2133
|
+
* `id`: required, integer, format: int64
|
|
2134
|
+
* `node_id`: required, string
|
|
2135
|
+
* `avatar_url`: required, string, format: uri
|
|
2136
|
+
* `gravatar_id`: required, string or null
|
|
2137
|
+
* `url`: required, string, format: uri
|
|
2138
|
+
* `html_url`: required, string, format: uri
|
|
2139
|
+
* `followers_url`: required, string, format: uri
|
|
2140
|
+
* `following_url`: required, string
|
|
2141
|
+
* `gists_url`: required, string
|
|
2142
|
+
* `starred_url`: required, string
|
|
2143
|
+
* `subscriptions_url`: required, string, format: uri
|
|
2144
|
+
* `organizations_url`: required, string, format: uri
|
|
2145
|
+
* `repos_url`: required, string, format: uri
|
|
2146
|
+
* `events_url`: required, string
|
|
2147
|
+
* `received_events_url`: required, string, format: uri
|
|
2148
|
+
* `type`: required, string
|
|
2149
|
+
* `site_admin`: required, boolean
|
|
2150
|
+
* `starred_at`: string
|
|
2151
|
+
* `user_view_type`: string
|
|
2152
|
+
* `private`: required, boolean
|
|
2153
|
+
* `html_url`: required, string, format: uri
|
|
2154
|
+
* `description`: required, string or null
|
|
2155
|
+
* `fork`: required, boolean
|
|
2156
|
+
* `url`: required, string, format: uri
|
|
2157
|
+
* `archive_url`: required, string
|
|
2158
|
+
* `assignees_url`: required, string
|
|
2159
|
+
* `blobs_url`: required, string
|
|
2160
|
+
* `branches_url`: required, string
|
|
2161
|
+
* `collaborators_url`: required, string
|
|
2162
|
+
* `comments_url`: required, string
|
|
2163
|
+
* `commits_url`: required, string
|
|
2164
|
+
* `compare_url`: required, string
|
|
2165
|
+
* `contents_url`: required, string
|
|
2166
|
+
* `contributors_url`: required, string, format: uri
|
|
2167
|
+
* `deployments_url`: required, string, format: uri
|
|
2168
|
+
* `downloads_url`: required, string, format: uri
|
|
2169
|
+
* `events_url`: required, string, format: uri
|
|
2170
|
+
* `forks_url`: required, string, format: uri
|
|
2171
|
+
* `git_commits_url`: required, string
|
|
2172
|
+
* `git_refs_url`: required, string
|
|
2173
|
+
* `git_tags_url`: required, string
|
|
2174
|
+
* `issue_comment_url`: required, string
|
|
2175
|
+
* `issue_events_url`: required, string
|
|
2176
|
+
* `issues_url`: required, string
|
|
2177
|
+
* `keys_url`: required, string
|
|
2178
|
+
* `labels_url`: required, string
|
|
2179
|
+
* `languages_url`: required, string, format: uri
|
|
2180
|
+
* `merges_url`: required, string, format: uri
|
|
2181
|
+
* `milestones_url`: required, string
|
|
2182
|
+
* `notifications_url`: required, string
|
|
2183
|
+
* `pulls_url`: required, string
|
|
2184
|
+
* `releases_url`: required, string
|
|
2185
|
+
* `stargazers_url`: required, string, format: uri
|
|
2186
|
+
* `statuses_url`: required, string
|
|
2187
|
+
* `subscribers_url`: required, string, format: uri
|
|
2188
|
+
* `subscription_url`: required, string, format: uri
|
|
2189
|
+
* `tags_url`: required, string, format: uri
|
|
2190
|
+
* `teams_url`: required, string, format: uri
|
|
2191
|
+
* `trees_url`: required, string
|
|
2192
|
+
* `hooks_url`: required, string, format: uri
|
|
2193
|
+
* `actor`: required, `Simple User` (see above)
|
|
2194
|
+
* `query_language`: required, string, enum: `actions`, `cpp`, `csharp`, `go`, `java`, `javascript`, `python`, `ruby`, `rust`, `swift`
|
|
2195
|
+
* `query_pack_url`: required, string
|
|
2196
|
+
* `created_at`: string, format: date-time
|
|
2197
|
+
* `updated_at`: string, format: date-time
|
|
2198
|
+
* `completed_at`: string or null, format: date-time
|
|
2199
|
+
* `status`: required, string, enum: `in_progress`, `succeeded`, `failed`, `cancelled`
|
|
2200
|
+
* `actions_workflow_run_id`: integer
|
|
2201
|
+
* `failure_reason`: string, enum: `no_repos_queried`, `actions_workflow_run_failed`, `internal_error`
|
|
2202
|
+
* `scanned_repositories`: array of objects:
|
|
2203
|
+
* `repository`: required, `Repository Identifier`:
|
|
2204
|
+
* `id`: required, integer
|
|
2205
|
+
* `name`: required, string
|
|
2206
|
+
* `full_name`: required, string
|
|
2207
|
+
* `private`: required, boolean
|
|
2208
|
+
* `stargazers_count`: required, integer
|
|
2209
|
+
* `updated_at`: required, string or null, format: date-time
|
|
2210
|
+
* `analysis_status`: required, string, enum: `pending`, `in_progress`, `succeeded`, `failed`, `canceled`, `timed_out`
|
|
2211
|
+
* `result_count`: integer
|
|
2212
|
+
* `artifact_size_in_bytes`: integer
|
|
2213
|
+
* `failure_message`: string
|
|
2214
|
+
* `skipped_repositories`: object:
|
|
2215
|
+
* `access_mismatch_repos`: required, object:
|
|
2216
|
+
* `repository_count`: required, integer
|
|
2217
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2218
|
+
* `not_found_repos`: required, object:
|
|
2219
|
+
* `repository_count`: required, integer
|
|
2220
|
+
* `repository_full_names`: required, array of string
|
|
2221
|
+
* `no_codeql_db_repos`: required, object:
|
|
2222
|
+
* `repository_count`: required, integer
|
|
2223
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2224
|
+
* `over_limit_repos`: required, object:
|
|
2225
|
+
* `repository_count`: required, integer
|
|
2226
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2227
|
+
|
|
2228
|
+
#### Using the "repository\_owners" field. "query\_pack" is abridged.
|
|
2229
|
+
|
|
2230
|
+
**Request:**
|
|
2231
|
+
|
|
2232
|
+
```curl
|
|
2233
|
+
curl -L \
|
|
2234
|
+
-X POST \
|
|
2235
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/codeql/variant-analyses \
|
|
2236
|
+
-d '{
|
|
2237
|
+
"language": "csharp",
|
|
2238
|
+
"query_pack": "aGVsbG8=",
|
|
2239
|
+
"repository_owners": [
|
|
2240
|
+
"octocat"
|
|
2241
|
+
]
|
|
2242
|
+
}'
|
|
2243
|
+
```
|
|
2244
|
+
|
|
2245
|
+
**Response schema (Status: 201):**
|
|
2246
|
+
|
|
2247
|
+
* `id`: required, integer
|
|
2248
|
+
* `controller_repo`: required, `Simple Repository`:
|
|
2249
|
+
* `id`: required, integer, format: int64
|
|
2250
|
+
* `node_id`: required, string
|
|
2251
|
+
* `name`: required, string
|
|
2252
|
+
* `full_name`: required, string
|
|
2253
|
+
* `owner`: required, `Simple User`:
|
|
2254
|
+
* `name`: string or null
|
|
2255
|
+
* `email`: string or null
|
|
2256
|
+
* `login`: required, string
|
|
2257
|
+
* `id`: required, integer, format: int64
|
|
2258
|
+
* `node_id`: required, string
|
|
2259
|
+
* `avatar_url`: required, string, format: uri
|
|
2260
|
+
* `gravatar_id`: required, string or null
|
|
2261
|
+
* `url`: required, string, format: uri
|
|
2262
|
+
* `html_url`: required, string, format: uri
|
|
2263
|
+
* `followers_url`: required, string, format: uri
|
|
2264
|
+
* `following_url`: required, string
|
|
2265
|
+
* `gists_url`: required, string
|
|
2266
|
+
* `starred_url`: required, string
|
|
2267
|
+
* `subscriptions_url`: required, string, format: uri
|
|
2268
|
+
* `organizations_url`: required, string, format: uri
|
|
2269
|
+
* `repos_url`: required, string, format: uri
|
|
2270
|
+
* `events_url`: required, string
|
|
2271
|
+
* `received_events_url`: required, string, format: uri
|
|
2272
|
+
* `type`: required, string
|
|
2273
|
+
* `site_admin`: required, boolean
|
|
2274
|
+
* `starred_at`: string
|
|
2275
|
+
* `user_view_type`: string
|
|
2276
|
+
* `private`: required, boolean
|
|
2277
|
+
* `html_url`: required, string, format: uri
|
|
2278
|
+
* `description`: required, string or null
|
|
2279
|
+
* `fork`: required, boolean
|
|
2280
|
+
* `url`: required, string, format: uri
|
|
2281
|
+
* `archive_url`: required, string
|
|
2282
|
+
* `assignees_url`: required, string
|
|
2283
|
+
* `blobs_url`: required, string
|
|
2284
|
+
* `branches_url`: required, string
|
|
2285
|
+
* `collaborators_url`: required, string
|
|
2286
|
+
* `comments_url`: required, string
|
|
2287
|
+
* `commits_url`: required, string
|
|
2288
|
+
* `compare_url`: required, string
|
|
2289
|
+
* `contents_url`: required, string
|
|
2290
|
+
* `contributors_url`: required, string, format: uri
|
|
2291
|
+
* `deployments_url`: required, string, format: uri
|
|
2292
|
+
* `downloads_url`: required, string, format: uri
|
|
2293
|
+
* `events_url`: required, string, format: uri
|
|
2294
|
+
* `forks_url`: required, string, format: uri
|
|
2295
|
+
* `git_commits_url`: required, string
|
|
2296
|
+
* `git_refs_url`: required, string
|
|
2297
|
+
* `git_tags_url`: required, string
|
|
2298
|
+
* `issue_comment_url`: required, string
|
|
2299
|
+
* `issue_events_url`: required, string
|
|
2300
|
+
* `issues_url`: required, string
|
|
2301
|
+
* `keys_url`: required, string
|
|
2302
|
+
* `labels_url`: required, string
|
|
2303
|
+
* `languages_url`: required, string, format: uri
|
|
2304
|
+
* `merges_url`: required, string, format: uri
|
|
2305
|
+
* `milestones_url`: required, string
|
|
2306
|
+
* `notifications_url`: required, string
|
|
2307
|
+
* `pulls_url`: required, string
|
|
2308
|
+
* `releases_url`: required, string
|
|
2309
|
+
* `stargazers_url`: required, string, format: uri
|
|
2310
|
+
* `statuses_url`: required, string
|
|
2311
|
+
* `subscribers_url`: required, string, format: uri
|
|
2312
|
+
* `subscription_url`: required, string, format: uri
|
|
2313
|
+
* `tags_url`: required, string, format: uri
|
|
2314
|
+
* `teams_url`: required, string, format: uri
|
|
2315
|
+
* `trees_url`: required, string
|
|
2316
|
+
* `hooks_url`: required, string, format: uri
|
|
2317
|
+
* `actor`: required, `Simple User` (see above)
|
|
2318
|
+
* `query_language`: required, string, enum: `actions`, `cpp`, `csharp`, `go`, `java`, `javascript`, `python`, `ruby`, `rust`, `swift`
|
|
2319
|
+
* `query_pack_url`: required, string
|
|
2320
|
+
* `created_at`: string, format: date-time
|
|
2321
|
+
* `updated_at`: string, format: date-time
|
|
2322
|
+
* `completed_at`: string or null, format: date-time
|
|
2323
|
+
* `status`: required, string, enum: `in_progress`, `succeeded`, `failed`, `cancelled`
|
|
2324
|
+
* `actions_workflow_run_id`: integer
|
|
2325
|
+
* `failure_reason`: string, enum: `no_repos_queried`, `actions_workflow_run_failed`, `internal_error`
|
|
2326
|
+
* `scanned_repositories`: array of objects:
|
|
2327
|
+
* `repository`: required, `Repository Identifier`:
|
|
2328
|
+
* `id`: required, integer
|
|
2329
|
+
* `name`: required, string
|
|
2330
|
+
* `full_name`: required, string
|
|
2331
|
+
* `private`: required, boolean
|
|
2332
|
+
* `stargazers_count`: required, integer
|
|
2333
|
+
* `updated_at`: required, string or null, format: date-time
|
|
2334
|
+
* `analysis_status`: required, string, enum: `pending`, `in_progress`, `succeeded`, `failed`, `canceled`, `timed_out`
|
|
2335
|
+
* `result_count`: integer
|
|
2336
|
+
* `artifact_size_in_bytes`: integer
|
|
2337
|
+
* `failure_message`: string
|
|
2338
|
+
* `skipped_repositories`: object:
|
|
2339
|
+
* `access_mismatch_repos`: required, object:
|
|
2340
|
+
* `repository_count`: required, integer
|
|
2341
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2342
|
+
* `not_found_repos`: required, object:
|
|
2343
|
+
* `repository_count`: required, integer
|
|
2344
|
+
* `repository_full_names`: required, array of string
|
|
2345
|
+
* `no_codeql_db_repos`: required, object:
|
|
2346
|
+
* `repository_count`: required, integer
|
|
2347
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2348
|
+
* `over_limit_repos`: required, object:
|
|
2349
|
+
* `repository_count`: required, integer
|
|
2350
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2351
|
+
|
|
2352
|
+
#### Using the "repository\_lists" field. "query\_pack" is abridged.
|
|
2353
|
+
|
|
2354
|
+
**Request:**
|
|
2355
|
+
|
|
2356
|
+
```curl
|
|
2357
|
+
curl -L \
|
|
2358
|
+
-X POST \
|
|
2359
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/codeql/variant-analyses \
|
|
2360
|
+
-d '{
|
|
2361
|
+
"language": "csharp",
|
|
2362
|
+
"query_pack": "aGVsbG8=",
|
|
2363
|
+
"repository_lists": [
|
|
2364
|
+
"top-100-csharp"
|
|
2365
|
+
]
|
|
2366
|
+
}'
|
|
2367
|
+
```
|
|
2368
|
+
|
|
2369
|
+
**Response schema (Status: 201):**
|
|
2370
|
+
|
|
2371
|
+
* `id`: required, integer
|
|
2372
|
+
* `controller_repo`: required, `Simple Repository`:
|
|
2373
|
+
* `id`: required, integer, format: int64
|
|
2374
|
+
* `node_id`: required, string
|
|
2375
|
+
* `name`: required, string
|
|
2376
|
+
* `full_name`: required, string
|
|
2377
|
+
* `owner`: required, `Simple User`:
|
|
2378
|
+
* `name`: string or null
|
|
2379
|
+
* `email`: string or null
|
|
2380
|
+
* `login`: required, string
|
|
2381
|
+
* `id`: required, integer, format: int64
|
|
2382
|
+
* `node_id`: required, string
|
|
2383
|
+
* `avatar_url`: required, string, format: uri
|
|
2384
|
+
* `gravatar_id`: required, string or null
|
|
2385
|
+
* `url`: required, string, format: uri
|
|
2386
|
+
* `html_url`: required, string, format: uri
|
|
2387
|
+
* `followers_url`: required, string, format: uri
|
|
2388
|
+
* `following_url`: required, string
|
|
2389
|
+
* `gists_url`: required, string
|
|
2390
|
+
* `starred_url`: required, string
|
|
2391
|
+
* `subscriptions_url`: required, string, format: uri
|
|
2392
|
+
* `organizations_url`: required, string, format: uri
|
|
2393
|
+
* `repos_url`: required, string, format: uri
|
|
2394
|
+
* `events_url`: required, string
|
|
2395
|
+
* `received_events_url`: required, string, format: uri
|
|
2396
|
+
* `type`: required, string
|
|
2397
|
+
* `site_admin`: required, boolean
|
|
2398
|
+
* `starred_at`: string
|
|
2399
|
+
* `user_view_type`: string
|
|
2400
|
+
* `private`: required, boolean
|
|
2401
|
+
* `html_url`: required, string, format: uri
|
|
2402
|
+
* `description`: required, string or null
|
|
2403
|
+
* `fork`: required, boolean
|
|
2404
|
+
* `url`: required, string, format: uri
|
|
2405
|
+
* `archive_url`: required, string
|
|
2406
|
+
* `assignees_url`: required, string
|
|
2407
|
+
* `blobs_url`: required, string
|
|
2408
|
+
* `branches_url`: required, string
|
|
2409
|
+
* `collaborators_url`: required, string
|
|
2410
|
+
* `comments_url`: required, string
|
|
2411
|
+
* `commits_url`: required, string
|
|
2412
|
+
* `compare_url`: required, string
|
|
2413
|
+
* `contents_url`: required, string
|
|
2414
|
+
* `contributors_url`: required, string, format: uri
|
|
2415
|
+
* `deployments_url`: required, string, format: uri
|
|
2416
|
+
* `downloads_url`: required, string, format: uri
|
|
2417
|
+
* `events_url`: required, string, format: uri
|
|
2418
|
+
* `forks_url`: required, string, format: uri
|
|
2419
|
+
* `git_commits_url`: required, string
|
|
2420
|
+
* `git_refs_url`: required, string
|
|
2421
|
+
* `git_tags_url`: required, string
|
|
2422
|
+
* `issue_comment_url`: required, string
|
|
2423
|
+
* `issue_events_url`: required, string
|
|
2424
|
+
* `issues_url`: required, string
|
|
2425
|
+
* `keys_url`: required, string
|
|
2426
|
+
* `labels_url`: required, string
|
|
2427
|
+
* `languages_url`: required, string, format: uri
|
|
2428
|
+
* `merges_url`: required, string, format: uri
|
|
2429
|
+
* `milestones_url`: required, string
|
|
2430
|
+
* `notifications_url`: required, string
|
|
2431
|
+
* `pulls_url`: required, string
|
|
2432
|
+
* `releases_url`: required, string
|
|
2433
|
+
* `stargazers_url`: required, string, format: uri
|
|
2434
|
+
* `statuses_url`: required, string
|
|
2435
|
+
* `subscribers_url`: required, string, format: uri
|
|
2436
|
+
* `subscription_url`: required, string, format: uri
|
|
2437
|
+
* `tags_url`: required, string, format: uri
|
|
2438
|
+
* `teams_url`: required, string, format: uri
|
|
2439
|
+
* `trees_url`: required, string
|
|
2440
|
+
* `hooks_url`: required, string, format: uri
|
|
2441
|
+
* `actor`: required, `Simple User` (see above)
|
|
2442
|
+
* `query_language`: required, string, enum: `actions`, `cpp`, `csharp`, `go`, `java`, `javascript`, `python`, `ruby`, `rust`, `swift`
|
|
2443
|
+
* `query_pack_url`: required, string
|
|
2444
|
+
* `created_at`: string, format: date-time
|
|
2445
|
+
* `updated_at`: string, format: date-time
|
|
2446
|
+
* `completed_at`: string or null, format: date-time
|
|
2447
|
+
* `status`: required, string, enum: `in_progress`, `succeeded`, `failed`, `cancelled`
|
|
2448
|
+
* `actions_workflow_run_id`: integer
|
|
2449
|
+
* `failure_reason`: string, enum: `no_repos_queried`, `actions_workflow_run_failed`, `internal_error`
|
|
2450
|
+
* `scanned_repositories`: array of objects:
|
|
2451
|
+
* `repository`: required, `Repository Identifier`:
|
|
2452
|
+
* `id`: required, integer
|
|
2453
|
+
* `name`: required, string
|
|
2454
|
+
* `full_name`: required, string
|
|
2455
|
+
* `private`: required, boolean
|
|
2456
|
+
* `stargazers_count`: required, integer
|
|
2457
|
+
* `updated_at`: required, string or null, format: date-time
|
|
2458
|
+
* `analysis_status`: required, string, enum: `pending`, `in_progress`, `succeeded`, `failed`, `canceled`, `timed_out`
|
|
2459
|
+
* `result_count`: integer
|
|
2460
|
+
* `artifact_size_in_bytes`: integer
|
|
2461
|
+
* `failure_message`: string
|
|
2462
|
+
* `skipped_repositories`: object:
|
|
2463
|
+
* `access_mismatch_repos`: required, object:
|
|
2464
|
+
* `repository_count`: required, integer
|
|
2465
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2466
|
+
* `not_found_repos`: required, object:
|
|
2467
|
+
* `repository_count`: required, integer
|
|
2468
|
+
* `repository_full_names`: required, array of string
|
|
2469
|
+
* `no_codeql_db_repos`: required, object:
|
|
2470
|
+
* `repository_count`: required, integer
|
|
2471
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2472
|
+
* `over_limit_repos`: required, object:
|
|
2473
|
+
* `repository_count`: required, integer
|
|
2474
|
+
* `repositories`: required, array of `Repository Identifier` (see above)
|
|
2475
|
+
|
|
2476
|
+
## Get the summary of a CodeQL variant analysis
|
|
2477
|
+
|
|
2478
|
+
```
|
|
2479
|
+
GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}
|
|
2480
|
+
```
|
|
2481
|
+
|
|
2482
|
+
Gets the summary of a CodeQL variant analysis.
|
|
2483
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
2484
|
+
|
|
2485
|
+
### Parameters
|
|
2486
|
+
|
|
2487
|
+
#### Headers
|
|
2488
|
+
|
|
2489
|
+
* **`accept`** (string)
|
|
2490
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
2491
|
+
|
|
2492
|
+
#### Path and query parameters
|
|
2493
|
+
|
|
2494
|
+
* **`owner`** (string) (required)
|
|
2495
|
+
The account owner of the repository. The name is not case sensitive.
|
|
2496
|
+
|
|
2497
|
+
* **`repo`** (string) (required)
|
|
2498
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
2499
|
+
|
|
2500
|
+
* **`codeql_variant_analysis_id`** (integer) (required)
|
|
2501
|
+
The unique identifier of the variant analysis.
|
|
2502
|
+
|
|
2503
|
+
### HTTP response status codes
|
|
2504
|
+
|
|
2505
|
+
* **200** - OK
|
|
2506
|
+
|
|
2507
|
+
* **404** - Resource not found
|
|
2508
|
+
|
|
2509
|
+
* **503** - Service unavailable
|
|
2510
|
+
|
|
2511
|
+
### Code examples
|
|
2512
|
+
|
|
2513
|
+
#### Example
|
|
2514
|
+
|
|
2515
|
+
**Request:**
|
|
2516
|
+
|
|
2517
|
+
```curl
|
|
2518
|
+
curl -L \
|
|
2519
|
+
-X GET \
|
|
2520
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/codeql/variant-analyses/CODEQL_VARIANT_ANALYSIS_ID
|
|
2521
|
+
```
|
|
2522
|
+
|
|
2523
|
+
**Response schema (Status: 200):**
|
|
2524
|
+
|
|
2525
|
+
Same response schema as [Create a CodeQL variant analysis](#create-a-codeql-variant-analysis).
|
|
2526
|
+
|
|
2527
|
+
## Get the analysis status of a repository in a CodeQL variant analysis
|
|
2528
|
+
|
|
2529
|
+
```
|
|
2530
|
+
GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}
|
|
2531
|
+
```
|
|
2532
|
+
|
|
2533
|
+
Gets the analysis status of a repository in a CodeQL variant analysis.
|
|
2534
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
2535
|
+
|
|
2536
|
+
### Parameters
|
|
2537
|
+
|
|
2538
|
+
#### Headers
|
|
2539
|
+
|
|
2540
|
+
* **`accept`** (string)
|
|
2541
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
2542
|
+
|
|
2543
|
+
#### Path and query parameters
|
|
2544
|
+
|
|
2545
|
+
* **`owner`** (string) (required)
|
|
2546
|
+
The account owner of the repository. The name is not case sensitive.
|
|
2547
|
+
|
|
2548
|
+
* **`repo`** (string) (required)
|
|
2549
|
+
The name of the controller repository.
|
|
2550
|
+
|
|
2551
|
+
* **`codeql_variant_analysis_id`** (integer) (required)
|
|
2552
|
+
The ID of the variant analysis.
|
|
2553
|
+
|
|
2554
|
+
* **`repo_owner`** (string) (required)
|
|
2555
|
+
The account owner of the variant analysis repository. The name is not case sensitive.
|
|
2556
|
+
|
|
2557
|
+
* **`repo_name`** (string) (required)
|
|
2558
|
+
The name of the variant analysis repository.
|
|
2559
|
+
|
|
2560
|
+
### HTTP response status codes
|
|
2561
|
+
|
|
2562
|
+
* **200** - OK
|
|
2563
|
+
|
|
2564
|
+
* **404** - Resource not found
|
|
2565
|
+
|
|
2566
|
+
* **503** - Service unavailable
|
|
2567
|
+
|
|
2568
|
+
### Code examples
|
|
2569
|
+
|
|
2570
|
+
#### Example
|
|
2571
|
+
|
|
2572
|
+
**Request:**
|
|
2573
|
+
|
|
2574
|
+
```curl
|
|
2575
|
+
curl -L \
|
|
2576
|
+
-X GET \
|
|
2577
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/codeql/variant-analyses/CODEQL_VARIANT_ANALYSIS_ID/repos/REPO_OWNER/REPO_NAME
|
|
2578
|
+
```
|
|
2579
|
+
|
|
2580
|
+
**Response schema (Status: 200):**
|
|
2581
|
+
|
|
2582
|
+
* `repository`: required, `Simple Repository`:
|
|
2583
|
+
* `id`: required, integer, format: int64
|
|
2584
|
+
* `node_id`: required, string
|
|
2585
|
+
* `name`: required, string
|
|
2586
|
+
* `full_name`: required, string
|
|
2587
|
+
* `owner`: required, `Simple User`:
|
|
2588
|
+
* `name`: string or null
|
|
2589
|
+
* `email`: string or null
|
|
2590
|
+
* `login`: required, string
|
|
2591
|
+
* `id`: required, integer, format: int64
|
|
2592
|
+
* `node_id`: required, string
|
|
2593
|
+
* `avatar_url`: required, string, format: uri
|
|
2594
|
+
* `gravatar_id`: required, string or null
|
|
2595
|
+
* `url`: required, string, format: uri
|
|
2596
|
+
* `html_url`: required, string, format: uri
|
|
2597
|
+
* `followers_url`: required, string, format: uri
|
|
2598
|
+
* `following_url`: required, string
|
|
2599
|
+
* `gists_url`: required, string
|
|
2600
|
+
* `starred_url`: required, string
|
|
2601
|
+
* `subscriptions_url`: required, string, format: uri
|
|
2602
|
+
* `organizations_url`: required, string, format: uri
|
|
2603
|
+
* `repos_url`: required, string, format: uri
|
|
2604
|
+
* `events_url`: required, string
|
|
2605
|
+
* `received_events_url`: required, string, format: uri
|
|
2606
|
+
* `type`: required, string
|
|
2607
|
+
* `site_admin`: required, boolean
|
|
2608
|
+
* `starred_at`: string
|
|
2609
|
+
* `user_view_type`: string
|
|
2610
|
+
* `private`: required, boolean
|
|
2611
|
+
* `html_url`: required, string, format: uri
|
|
2612
|
+
* `description`: required, string or null
|
|
2613
|
+
* `fork`: required, boolean
|
|
2614
|
+
* `url`: required, string, format: uri
|
|
2615
|
+
* `archive_url`: required, string
|
|
2616
|
+
* `assignees_url`: required, string
|
|
2617
|
+
* `blobs_url`: required, string
|
|
2618
|
+
* `branches_url`: required, string
|
|
2619
|
+
* `collaborators_url`: required, string
|
|
2620
|
+
* `comments_url`: required, string
|
|
2621
|
+
* `commits_url`: required, string
|
|
2622
|
+
* `compare_url`: required, string
|
|
2623
|
+
* `contents_url`: required, string
|
|
2624
|
+
* `contributors_url`: required, string, format: uri
|
|
2625
|
+
* `deployments_url`: required, string, format: uri
|
|
2626
|
+
* `downloads_url`: required, string, format: uri
|
|
2627
|
+
* `events_url`: required, string, format: uri
|
|
2628
|
+
* `forks_url`: required, string, format: uri
|
|
2629
|
+
* `git_commits_url`: required, string
|
|
2630
|
+
* `git_refs_url`: required, string
|
|
2631
|
+
* `git_tags_url`: required, string
|
|
2632
|
+
* `issue_comment_url`: required, string
|
|
2633
|
+
* `issue_events_url`: required, string
|
|
2634
|
+
* `issues_url`: required, string
|
|
2635
|
+
* `keys_url`: required, string
|
|
2636
|
+
* `labels_url`: required, string
|
|
2637
|
+
* `languages_url`: required, string, format: uri
|
|
2638
|
+
* `merges_url`: required, string, format: uri
|
|
2639
|
+
* `milestones_url`: required, string
|
|
2640
|
+
* `notifications_url`: required, string
|
|
2641
|
+
* `pulls_url`: required, string
|
|
2642
|
+
* `releases_url`: required, string
|
|
2643
|
+
* `stargazers_url`: required, string, format: uri
|
|
2644
|
+
* `statuses_url`: required, string
|
|
2645
|
+
* `subscribers_url`: required, string, format: uri
|
|
2646
|
+
* `subscription_url`: required, string, format: uri
|
|
2647
|
+
* `tags_url`: required, string, format: uri
|
|
2648
|
+
* `teams_url`: required, string, format: uri
|
|
2649
|
+
* `trees_url`: required, string
|
|
2650
|
+
* `hooks_url`: required, string, format: uri
|
|
2651
|
+
* `analysis_status`: required, string, enum: `pending`, `in_progress`, `succeeded`, `failed`, `canceled`, `timed_out`
|
|
2652
|
+
* `artifact_size_in_bytes`: integer
|
|
2653
|
+
* `result_count`: integer
|
|
2654
|
+
* `failure_message`: string
|
|
2655
|
+
* `database_commit_sha`: string
|
|
2656
|
+
* `source_location_prefix`: string
|
|
2657
|
+
* `artifact_url`: string
|
|
2658
|
+
|
|
2659
|
+
## Get a code scanning default setup configuration
|
|
2660
|
+
|
|
2661
|
+
```
|
|
2662
|
+
GET /repos/{owner}/{repo}/code-scanning/default-setup
|
|
2663
|
+
```
|
|
2664
|
+
|
|
2665
|
+
Gets a code scanning default setup configuration.
|
|
2666
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
2667
|
+
|
|
2668
|
+
### Parameters
|
|
2669
|
+
|
|
2670
|
+
#### Headers
|
|
2671
|
+
|
|
2672
|
+
* **`accept`** (string)
|
|
2673
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
2674
|
+
|
|
2675
|
+
#### Path and query parameters
|
|
2676
|
+
|
|
2677
|
+
* **`owner`** (string) (required)
|
|
2678
|
+
The account owner of the repository. The name is not case sensitive.
|
|
2679
|
+
|
|
2680
|
+
* **`repo`** (string) (required)
|
|
2681
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
2682
|
+
|
|
2683
|
+
### HTTP response status codes
|
|
2684
|
+
|
|
2685
|
+
* **200** - OK
|
|
2686
|
+
|
|
2687
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
2688
|
+
|
|
2689
|
+
* **404** - Resource not found
|
|
2690
|
+
|
|
2691
|
+
* **503** - Service unavailable
|
|
2692
|
+
|
|
2693
|
+
### Code examples
|
|
2694
|
+
|
|
2695
|
+
#### Example
|
|
2696
|
+
|
|
2697
|
+
**Request:**
|
|
2698
|
+
|
|
2699
|
+
```curl
|
|
2700
|
+
curl -L \
|
|
2701
|
+
-X GET \
|
|
2702
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/default-setup
|
|
2703
|
+
```
|
|
2704
|
+
|
|
2705
|
+
**Response schema (Status: 200):**
|
|
2706
|
+
|
|
2707
|
+
* `state`: string, enum: `configured`, `not-configured`
|
|
2708
|
+
* `languages`: array of string, enum: `actions`, `c-cpp`, `csharp`, `go`, `java-kotlin`, `javascript-typescript`, `python`, `ruby`, `swift`
|
|
2709
|
+
* `runner_type`: string or null, enum: `standard`, `labeled`, `null`
|
|
2710
|
+
* `runner_label`: string or null
|
|
2711
|
+
* `query_suite`: string, enum: `default`, `extended`
|
|
2712
|
+
* `threat_model`: string, enum: `remote`, `remote_and_local`
|
|
2713
|
+
* `updated_at`: string or null, format: date-time
|
|
2714
|
+
* `schedule`: string or null, enum: `weekly`, `null`
|
|
2715
|
+
|
|
2716
|
+
## Update a code scanning default setup configuration
|
|
2717
|
+
|
|
2718
|
+
```
|
|
2719
|
+
PATCH /repos/{owner}/{repo}/code-scanning/default-setup
|
|
2720
|
+
```
|
|
2721
|
+
|
|
2722
|
+
Updates a code scanning default setup configuration.
|
|
2723
|
+
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
2724
|
+
|
|
2725
|
+
### Parameters
|
|
2726
|
+
|
|
2727
|
+
#### Headers
|
|
2728
|
+
|
|
2729
|
+
* **`accept`** (string)
|
|
2730
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
2731
|
+
|
|
2732
|
+
#### Path and query parameters
|
|
2733
|
+
|
|
2734
|
+
* **`owner`** (string) (required)
|
|
2735
|
+
The account owner of the repository. The name is not case sensitive.
|
|
2736
|
+
|
|
2737
|
+
* **`repo`** (string) (required)
|
|
2738
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
2739
|
+
|
|
2740
|
+
#### Body parameters
|
|
2741
|
+
|
|
2742
|
+
* **`state`** (string)
|
|
2743
|
+
The desired state of code scanning default setup.
|
|
2744
|
+
Can be one of: `configured`, `not-configured`
|
|
2745
|
+
|
|
2746
|
+
* **`runner_type`** (string)
|
|
2747
|
+
Runner type to be used.
|
|
2748
|
+
Can be one of: `standard`, `labeled`
|
|
2749
|
+
|
|
2750
|
+
* **`runner_label`** (string or null)
|
|
2751
|
+
Runner label to be used if the runner type is labeled.
|
|
2752
|
+
|
|
2753
|
+
* **`query_suite`** (string)
|
|
2754
|
+
CodeQL query suite to be used.
|
|
2755
|
+
Can be one of: `default`, `extended`
|
|
2756
|
+
|
|
2757
|
+
* **`threat_model`** (string)
|
|
2758
|
+
Threat model to be used for code scanning analysis. Use remote to analyze only network sources and remote\_and\_local to include local sources like filesystem access, command-line arguments, database reads, environment variable and standard input.
|
|
2759
|
+
Can be one of: `remote`, `remote_and_local`
|
|
2760
|
+
|
|
2761
|
+
* **`languages`** (array of strings)
|
|
2762
|
+
CodeQL languages to be analyzed.
|
|
2763
|
+
Supported values are: actions, c-cpp, csharp, go, java-kotlin, javascript-typescript, python, ruby, swift
|
|
2764
|
+
|
|
2765
|
+
### HTTP response status codes
|
|
2766
|
+
|
|
2767
|
+
* **200** - OK
|
|
2768
|
+
|
|
2769
|
+
* **202** - Accepted
|
|
2770
|
+
|
|
2771
|
+
* **403** - Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
|
|
2772
|
+
|
|
2773
|
+
* **404** - Resource not found
|
|
2774
|
+
|
|
2775
|
+
* **409** - Response if there is already a validation run in progress with a different default setup configuration
|
|
2776
|
+
|
|
2777
|
+
* **422** - Response if the configuration change cannot be made because the repository is not in the required state
|
|
2778
|
+
|
|
2779
|
+
* **503** - Service unavailable
|
|
2780
|
+
|
|
2781
|
+
### Code examples
|
|
2782
|
+
|
|
2783
|
+
#### Example
|
|
2784
|
+
|
|
2785
|
+
**Request:**
|
|
2786
|
+
|
|
2787
|
+
```curl
|
|
2788
|
+
curl -L \
|
|
2789
|
+
-X PATCH \
|
|
2790
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/default-setup \
|
|
2791
|
+
-d '{
|
|
2792
|
+
"state": "configured",
|
|
2793
|
+
"threat_model": "remote_and_local"
|
|
2794
|
+
}'
|
|
2795
|
+
```
|
|
2796
|
+
|
|
2797
|
+
**Response schema (Status: 202):**
|
|
2798
|
+
|
|
2799
|
+
* `run_id`: integer
|
|
2800
|
+
* `run_url`: string
|
|
2801
|
+
|
|
2802
|
+
## Upload an analysis as SARIF data
|
|
2803
|
+
|
|
2804
|
+
```
|
|
2805
|
+
POST /repos/{owner}/{repo}/code-scanning/sarifs
|
|
2806
|
+
```
|
|
2807
|
+
|
|
2808
|
+
Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. For troubleshooting information, see "Troubleshooting SARIF uploads."
|
|
2809
|
+
There are two places where you can upload code scanning results.
|
|
2810
|
+
|
|
2811
|
+
If you upload to a pull request, for example --ref refs/pull/42/merge or --ref refs/pull/42/head, then the results appear as alerts in a pull request check. For more information, see "Triaging code scanning alerts in pull requests."
|
|
2812
|
+
If you upload to a branch, for example --ref refs/heads/my-branch, then the results appear in the Security tab for your repository. For more information, see "Managing code scanning alerts for your repository."
|
|
2813
|
+
|
|
2814
|
+
You must compress the SARIF-formatted analysis data that you want to upload, using gzip, and then encode it as a Base64 format string. For example:
|
|
2815
|
+
gzip -c analysis-data.sarif | base64 -w0
|
|
2816
|
+
|
|
2817
|
+
SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable.
|
|
2818
|
+
To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration. For example, for the CodeQL tool, identify and remove the most noisy queries. For more information, see "SARIF results exceed one or more limits."
|
|
2819
|
+
|
|
2820
|
+
SARIF dataMaximum valuesAdditional limitsRuns per file20Results per run25,000Only the top 5,000 results will be included, prioritized by severity.Rules per run25,000Tool extensions per run100Thread Flow Locations per result10,000Only the top 1,000 Thread Flow Locations will be included, using prioritization.Location per result1,000Only 100 locations will be included.Tags per rule20Only 10 tags will be included.
|
|
2821
|
+
The 202 Accepted response includes an id value.
|
|
2822
|
+
You can use this ID to check the status of the upload by using it in the /sarifs/{sarif\_id} endpoint.
|
|
2823
|
+
For more information, see "Get information about a SARIF upload."
|
|
2824
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
2825
|
+
This endpoint is limited to 1,000 requests per hour for each user or app installation calling it.
|
|
2826
|
+
|
|
2827
|
+
### Parameters
|
|
2828
|
+
|
|
2829
|
+
#### Headers
|
|
2830
|
+
|
|
2831
|
+
* **`accept`** (string)
|
|
2832
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
2833
|
+
|
|
2834
|
+
#### Path and query parameters
|
|
2835
|
+
|
|
2836
|
+
* **`owner`** (string) (required)
|
|
2837
|
+
The account owner of the repository. The name is not case sensitive.
|
|
2838
|
+
|
|
2839
|
+
* **`repo`** (string) (required)
|
|
2840
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
2841
|
+
|
|
2842
|
+
#### Body parameters
|
|
2843
|
+
|
|
2844
|
+
* **`commit_sha`** (string) (required)
|
|
2845
|
+
The SHA of the commit to which the analysis you are uploading relates.
|
|
2846
|
+
|
|
2847
|
+
* **`ref`** (string) (required)
|
|
2848
|
+
The full Git reference, formatted as refs/heads/<branch name>,
|
|
2849
|
+
refs/tags/<tag>, refs/pull/<number>/merge, or refs/pull/<number>/head.
|
|
2850
|
+
|
|
2851
|
+
* **`sarif`** (string) (required)
|
|
2852
|
+
A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using gzip and then translate the contents of the file into a Base64 encoding string. For more information, see "SARIF support for code scanning."
|
|
2853
|
+
|
|
2854
|
+
* **`checkout_uri`** (string)
|
|
2855
|
+
The base directory used in the analysis, as it appears in the SARIF file.
|
|
2856
|
+
This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.
|
|
2857
|
+
|
|
2858
|
+
* **`started_at`** (string)
|
|
2859
|
+
The time that the analysis run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
|
|
2860
|
+
|
|
2861
|
+
* **`tool_name`** (string)
|
|
2862
|
+
The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the tool\_guid parameter of operations such as GET /repos/{owner}/{repo}/code-scanning/alerts.
|
|
2863
|
+
|
|
2864
|
+
* **`validate`** (boolean)
|
|
2865
|
+
Whether the SARIF file will be validated according to the code scanning specifications.
|
|
2866
|
+
This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning.
|
|
2867
|
+
|
|
2868
|
+
### HTTP response status codes
|
|
2869
|
+
|
|
2870
|
+
* **202** - Accepted
|
|
2871
|
+
|
|
2872
|
+
* **400** - Bad Request if the sarif field is invalid
|
|
2873
|
+
|
|
2874
|
+
* **403** - Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
|
|
2875
|
+
|
|
2876
|
+
* **404** - Resource not found
|
|
2877
|
+
|
|
2878
|
+
* **413** - Payload Too Large if the sarif field is too large
|
|
2879
|
+
|
|
2880
|
+
* **503** - Service unavailable
|
|
2881
|
+
|
|
2882
|
+
### Code examples
|
|
2883
|
+
|
|
2884
|
+
#### Example
|
|
2885
|
+
|
|
2886
|
+
**Request:**
|
|
2887
|
+
|
|
2888
|
+
```curl
|
|
2889
|
+
curl -L \
|
|
2890
|
+
-X POST \
|
|
2891
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/sarifs \
|
|
2892
|
+
-d '{
|
|
2893
|
+
"commit_sha": "4b6472266afd7b471e86085a6659e8c7f2b119da",
|
|
2894
|
+
"ref": "refs/heads/master",
|
|
2895
|
+
"sarif": "H4sICMLGdF4AA2V4YW1wbGUuc2FyaWYAvVjdbts2FL7PUxDCijaA/CM7iRNfLkPXYgHSNstumlzQ0pHFVCI1korjFgH2ONtr7Ul2KFmy/mOn6QIkjsjDw0/nfN85NL8dEGL9pNwAImqRObECrWM1H40kXQ2XTAfJIlEgXcE1cD10RTQSVDE10K4aKSqZP1AxuKOIKg1ydJU60jSfSh8Hk6EzHA/vlOCWbfa7B6kYPpj90rlsWCZcmbHP5Bs+4oAWIjQD2SMOeJLh2vIQDnIaQerqXHjw8YIgxohybxAyDsS4cAPKsp03K4RcUs6+Up2D+JXpd8mibKIQN9fM/aMCdbyBujGSSQgVxJtx5qX2d2qUcIweQhEuDQf3GBO6CKHkogx/N3MVCKl/AeVKFuf4y5ubsMGDTj1ep+5I7sgmLIpxtU38hLtmMRGSuCFVyip5eKzs5ydh+LztVL6f2m6oih1BkYiuyQIIJWodxVpERPj4sEiWBNNH8EWT0DMG8EAjzKVHXCrB4FkPu/F64NMk1OeC+2yZSNoBOoR7CC0EzYWGbm+xFDFIzbI011+cLjfZtyJkmMZfumAh02uL3NpV2y+MZ6RAjxibyKrNxxJcVjANSb4eBGwZ1M0KsuyR2poLr5rMl8vaDSeVn6eTWEO2j2xIEcmhwlTKNOi4GMOI8gfuZYkvJ7b4v5Tiumyz7RnHeodFzpS8ASIZCH/AYdWi2z3sG8JtFxJ6fF9yR9CdifBr9Pd6d5V2+zbJKjjCFGGmsHuYFy2ytJq9tUxcLSRSQecppOGKrpUxYfxefMEFK+wOGa4hudQByBVT0L+EKtyACxnRsABhEx1QjVDs1KNI9MbpnhqfE45B6FJvu3hRu5VRU9MhZLmK7fqkKyQSTHNoyMqUFMqXCV3CwAeqEwmVokraK8IuBaGvHjQ0gMYrKjnjyw7uk9uD8tgmsBbFMPnU1bV2ZhkJNkuolUiWys3UPWzs5aaIUz9TBe8zMb+6+nT+6fLy91dlE3xzeDDT4zYszb0bW6NjJd0Rvn2EnLvWLFSdKPpBzInzfRgu8ETyMcH8nIfMnJCeC2PyfTA+UKngcnGH7Hw2hGkVQs5YlIRCtdWZYQ4/73es2JlxkfViOEIhoWJq5Oo6UBBfiKIqFBWhiE3jJGbFwVoxBHTRSuIS67sMeplei24X20shLjG+8gqbKC/bESiNMC+wd5q5id0yeS7CJEqXzmrTWNq3k05l84P6f4/bEmXFJjI0fIt1BGQssUnUDkBYeVhE5TqPnMH3jqogDcP0zKcTgLPTMSzOjhbjuVOmW23l1fYNStulfo6sXlFsGLhbDy5RECPRYGCTgOj2bd4nUQEivEd0H7KKYxqnEhFohuur3a3UPskbH/+Yg0+M5P2MHRJu3ziHh3Z2NCrWt3XF1rWTw8Ne/pfbWYXnDSE0SNZQQt1i18q7te2vOhu7ehWuvVyeu0wbLZi24mhoo6aOOTltzG/lgdVvVoXQq5V+pewkFIzL8fjEcadT55jOjpzFzHuOTtDNrMkJPMVQDd7F09RID72O/UPZ0tmctqZ7kWX6EmSZnDpP8GU67SXM8XE3YSrxbKsx6UReZ4y6n/FVZfJjs9Z7stma75W5yQtkzjk5eSJxk1lv4o7+j8TlhaJ2lsKWZO6lruDPBLib3x5ZN/KGWzZ+pn///evv7OOf4iIBv3oY9L/l1wiJ9p0Tc+F1zZnOE9NxXWEus6IQhr5pMfoqxi8WPsuu0azsns4UC6WzNzHIzbeEx4P/AJ3SefgcFAAA"
|
|
2896
|
+
}'
|
|
2897
|
+
```
|
|
2898
|
+
|
|
2899
|
+
**Response schema (Status: 202):**
|
|
2900
|
+
|
|
2901
|
+
* `id`: string
|
|
2902
|
+
* `url`: string, format: uri, read-only
|
|
2903
|
+
|
|
2904
|
+
## Get information about a SARIF upload
|
|
2905
|
+
|
|
2906
|
+
```
|
|
2907
|
+
GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}
|
|
2908
|
+
```
|
|
2909
|
+
|
|
2910
|
+
Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "Get a code scanning analysis for a repository."
|
|
2911
|
+
OAuth app tokens and personal access tokens (classic) need the security\_events scope to use this endpoint with private or public repositories, or the public\_repo scope to use this endpoint with only public repositories.
|
|
2912
|
+
|
|
2913
|
+
### Parameters
|
|
2914
|
+
|
|
2915
|
+
#### Headers
|
|
2916
|
+
|
|
2917
|
+
* **`accept`** (string)
|
|
2918
|
+
Setting to `application/vnd.github+json` is recommended.
|
|
2919
|
+
|
|
2920
|
+
#### Path and query parameters
|
|
2921
|
+
|
|
2922
|
+
* **`owner`** (string) (required)
|
|
2923
|
+
The account owner of the repository. The name is not case sensitive.
|
|
2924
|
+
|
|
2925
|
+
* **`repo`** (string) (required)
|
|
2926
|
+
The name of the repository without the .git extension. The name is not case sensitive.
|
|
2927
|
+
|
|
2928
|
+
* **`sarif_id`** (string) (required)
|
|
2929
|
+
The SARIF ID obtained after uploading.
|
|
2930
|
+
|
|
2931
|
+
### HTTP response status codes
|
|
2932
|
+
|
|
2933
|
+
* **200** - OK
|
|
2934
|
+
|
|
2935
|
+
* **403** - Response if GitHub Advanced Security is not enabled for this repository
|
|
2936
|
+
|
|
2937
|
+
* **404** - Not Found if the sarif id does not match any upload
|
|
2938
|
+
|
|
2939
|
+
* **503** - Service unavailable
|
|
2940
|
+
|
|
2941
|
+
### Code examples
|
|
2942
|
+
|
|
2943
|
+
#### Example
|
|
2944
|
+
|
|
2945
|
+
**Request:**
|
|
2946
|
+
|
|
2947
|
+
```curl
|
|
2948
|
+
curl -L \
|
|
2949
|
+
-X GET \
|
|
2950
|
+
https://api.github.com/repos/OWNER/REPO/code-scanning/sarifs/SARIF_ID
|
|
2951
|
+
```
|
|
2952
|
+
|
|
2953
|
+
**Response schema (Status: 200):**
|
|
2954
|
+
|
|
2955
|
+
* `processing_status`: string, enum: `pending`, `complete`, `failed`
|
|
2956
|
+
* `analyses_url`: string or null, format: uri, read-only
|
|
2957
|
+
* `errors`: array of string or null
|