Skip to content

Get a workspace's security overview: open alerts by type and severity, how many opened and closed in the last days (7 to 90, 30 by default), a daily trend, and for each repository which features are on and what is open, most in need first.

GET/workspaces/{workspace}/security/overview

Private repositories count only on the g1t plan.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: security with action overview, and the same inputs
  • Scope: An access token needs security:read.
Name Type Required Description
workspace string Yes The workspace’s slug, e.g. “flagon-io”.
Name Type Required Description
days integer No Days of trend, 7 to 90. Default 30.
curl "https://api.g1t.sh/workspaces/flagon-io/security/overview?days=30" \
-H "Authorization: Bearer $G1T_TOKEN"

A successful request answers 200 with:

{
"activated": true,
"private_hidden": 0,
"totals": [
{
"alert_type": "secret_scanning",
"open": {
"critical": 1,
"high": 0,
"medium": 0,
"low": 0,
"unknown": 0
},
"opened": 2,
"closed": 1
},
{
"alert_type": "code_scanning",
"open": {
"critical": 0,
"high": 3,
"medium": 4,
"low": 0,
"unknown": 0
},
"opened": 7,
"closed": 2
},
{
"alert_type": "vulnerability",
"open": {
"critical": 0,
"high": 1,
"medium": 2,
"low": 1,
"unknown": 0
},
"opened": 3,
"closed": 5
}
],
"trend": [
{
"day": "2026-10-05",
"secret_scanning": 1,
"code_scanning": 8,
"vulnerability": 6
},
{
"day": "2026-10-06",
"secret_scanning": 1,
"code_scanning": 7,
"vulnerability": 4
}
],
"repos": [
{
"repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
"name": "hello",
"private": true,
"custom_patterns": 1,
"validity_checks": true,
"code_scanning_at": "2026-10-06T09:14:02.118Z",
"dependency_review": true,
"security_updates": true,
"lockfiles": 1,
"secrets": {
"critical": 1,
"high": 0,
"medium": 0,
"low": 0,
"unknown": 0
},
"code": {
"critical": 0,
"high": 3,
"medium": 4,
"low": 0,
"unknown": 0
},
"vulnerabilities": {
"critical": 0,
"high": 1,
"medium": 2,
"low": 1,
"unknown": 0
}
}
]
}

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
422 invalid The input is not valid. message says which field and why.