Authentication
Skylos Cloud currently has three real auth paths:
| Auth path | Best for | Main command |
|---|---|---|
| Browser login | Humans linking a repo to a project | skylos login |
| API key | CI, headless systems, explicit manual control | skylos sync connect <token> or SKYLOS_TOKEN=... |
| GitHub OIDC | Secretless GitHub Actions uploads | skylos . --upload with id-token: write |
Quick Startβ
skylos . --upload
On the first interactive run, Skylos will:
- open the browser
- let you sign in and choose or create a project
- verify the returned token
- store the repo link
- upload the scan
If you want to connect before running a scan, use:
skylos login
Browser Authenticationβ
skylos login is the preferred human workflow.
skylos login
What it does:
- opens
skylos.dev/cli/connect - signs you in with GitHub if needed
- lets you select or create a project
- verifies the token with
/api/sync/whoami - stores the saved credentials and repo link
Files written:
~/.skylos/credentials.json<repo>/.skylos/link.json
After a repo is linked, plain skylos . will auto-enable upload unless you pass --no-upload.
skylos .
skylos . --no-upload
Switching or inspecting the linked projectβ
Useful commands:
skylos project status
skylos project list
skylos project use
skylos project unlink
skylos sync status
Re-running skylos login opens the chooser again. If you complete the flow with a different project, the repo link is updated. If you close the browser flow, the current project is kept.
Manual API Keysβ
Use API keys when you want explicit, non-browser auth.
Get the key from:
Dashboard -> Settings -> choose project -> API key
The current UI behavior is:
- a newly created key is only shown once
- rotating the key revokes the old one immediately
Save the key to the current repoβ
skylos sync connect sk_live_xxx...
Or run without an argument and paste it interactively:
skylos sync connect
Use the key for a single runβ
SKYLOS_TOKEN=sk_live_xxx... skylos . --upload
Best use cases for API keysβ
- GitLab, CircleCI, Jenkins, and other non-GitHub CI
- headless servers
- scripted uploads
- temporary override of the repo-linked project
GitHub Actions OIDCβ
OIDC is the secretless GitHub Actions path.
Preconditions:
- your Skylos project has a unique
repo_urlthat matches the GitHub repository - your workflow has
id-token: write
name: Skylos Scan
on: [pull_request]
permissions:
contents: read
id-token: write
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install skylos
- run: skylos . --danger --upload
How it works:
- GitHub Actions issues a short-lived OIDC token
- Skylos verifies the token against GitHub's OIDC issuer
- Skylos resolves the project by matching the GitHub
repositoryclaim to the project'srepo_url - the scan uploads with no
SKYLOS_TOKENsecret
Important repo-binding ruleβ
OIDC uploads only work when one GitHub repo maps to one Skylos project.
If no project matches the repo URL, upload fails. If multiple projects match the same repo URL, upload also fails.
Token Resolution Orderβ
The current CLI token lookup order is:
SKYLOS_TOKEN- GitHub Actions OIDC
- the current repo link plus
~/.skylos/credentials.json - the legacy default saved token
- system keyring fallback
That means SKYLOS_TOKEN is the cleanest way to override the linked project for one run.
Upload Attributionβ
Skylos Cloud records upload attribution from the server-side auth path.
| Upload path | Attribution source |
|---|---|
| Browser login | linked user and project credential |
| API key | resolved project key identity |
| GitHub OIDC | verified GitHub OIDC claims and matched project binding |
If two people upload from different machines to the same project, Skylos does not rely only on a client-supplied name. Cloud records the resolved project, auth path, repo/project-root context, branch, commit metadata, and upload time.
For enterprise security review, see Enterprise Trust.
Headless and Remote Environmentsβ
If browser auth is unavailable, Skylos falls back to manual token entry.
Use one of these:
skylos sync connect
or:
SKYLOS_TOKEN=sk_live_xxx... skylos . --upload
Troubleshootingβ
skylos . --upload opens a browser unexpectedlyβ
The CLI could not find a usable token and is trying to connect interactively.
OIDC fails even though id-token: write is setβ
Check the project's repo URL in the dashboard. OIDC resolution depends on that binding.
OIDC says the repo is ambiguousβ
More than one project has the same repo_url. Remove the duplicate binding.
A token stopped workingβ
The key may have been rotated or revoked. Generate a new one in dashboard settings and update your CI secrets.
I need to move this repo to a different cloud projectβ
skylos project unlink
skylos login