codeScanningGetDefaultSetup
Get a code scanning default setup configuration
Details
- Method:
GET - Path:
/repos/{owner}/{repo}/code-scanning/default-setup - Operation ID:
code-scanning/get-default-setup
Parameters
{
"owner": {
"description": "The account owner of the repository. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"repo": {
"description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
}
}Response Schema
{
"description": "Configuration for code scanning default setup.",
"type": "object",
"properties": {
"state": {
"description": "Code scanning default setup has been configured or not.",
"type": "string",
"enum": [
"configured",
"not-configured"
]
},
"languages": {
"description": "Languages to be analyzed.",
"type": "array",
"items": {
"type": "string",
"enum": [
"actions",
"c-cpp",
"csharp",
"go",
"java-kotlin",
"javascript-typescript",
"javascript",
"python",
"ruby",
"typescript",
"swift"
]
}
},
"runner_type": {
"description": "Runner type to be used.",
"nullable": true,
"type": "string",
"enum": [
"standard",
"labeled"
]
},
"runner_label": {
"description": "Runner label to be used if the runner type is labeled.",
"nullable": true,
"type": "string",
"example": "code-scanning"
},
"query_suite": {
"description": "CodeQL query suite to be used.",
"type": "string",
"enum": [
"default",
"extended"
]
},
"threat_model": {
"description": "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.",
"type": "string",
"enum": [
"remote",
"remote_and_local"
]
},
"updated_at": {
"description": "Timestamp of latest configuration update.",
"nullable": true,
"type": "string",
"format": "date-time",
"example": "2023-12-06T14:20:20.000Z"
},
"schedule": {
"description": "The frequency of the periodic analysis.",
"nullable": true,
"type": "string",
"enum": [
"weekly"
]
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('codeScanningGetDefaultSetup', {
# Add required parameters here
})