Check scan repository access
curl --request POST \
--url https://api.trycomp.ai/v1/security-penetration-tests/repo-check \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"repoUrl": "https://github.com/acme/storefront"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({repoUrl: 'https://github.com/acme/storefront'})
};
fetch('https://api.trycomp.ai/v1/security-penetration-tests/repo-check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/security-penetration-tests/repo-check"
payload = { "repoUrl": "https://github.com/acme/storefront" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"visibility": "private",
"defaultBranch": "main",
"fullName": "acme/storefront",
"reason": "No GitHub connection is configured for this organization"
}Security Penetration Tests
Check scan repository access | Comp AI API
Checks a GitHub repository before starting a scan: it exists, its visibility and default branch, and whether the stored GitHub connection can see it. Call.
POST
/
v1
/
security-penetration-tests
/
repo-check
Check scan repository access
curl --request POST \
--url https://api.trycomp.ai/v1/security-penetration-tests/repo-check \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"repoUrl": "https://github.com/acme/storefront"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({repoUrl: 'https://github.com/acme/storefront'})
};
fetch('https://api.trycomp.ai/v1/security-penetration-tests/repo-check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/security-penetration-tests/repo-check"
payload = { "repoUrl": "https://github.com/acme/storefront" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"visibility": "private",
"defaultBranch": "main",
"fullName": "acme/storefront",
"reason": "No GitHub connection is configured for this organization"
}Headers
Body
application/json
Repository URL the scan would clone, e.g. https://github.com/owner/repo
Example:
"https://github.com/acme/storefront"
Response
200 - application/json
Was this page helpful?

