@codacy/verity-cli 0.26.0-experimental.a2dc844 → 0.26.0-experimental.fb8a404
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/bin/verity.js
CHANGED
|
@@ -10474,10 +10474,9 @@ var SECURITY_PATTERNS = [
|
|
|
10474
10474
|
];
|
|
10475
10475
|
var PROD_SERVICE_URL = "https://ofcamwrjwrkazqvdchko.supabase.co/functions/v1";
|
|
10476
10476
|
var DEFAULT_SERVICE_URL = "https://yyfaqvcgslcrzvrbvqik.supabase.co/functions/v1".length > 0 ? "https://yyfaqvcgslcrzvrbvqik.supabase.co/functions/v1" : PROD_SERVICE_URL;
|
|
10477
|
-
var GITHUB_CLIENT_ID = "
|
|
10477
|
+
var GITHUB_CLIENT_ID = "Iv23li88HxAi3ZrbYzWh";
|
|
10478
10478
|
var GITHUB_DEVICE_CODE_URL = "https://github.com/login/device/code";
|
|
10479
10479
|
var GITHUB_ACCESS_TOKEN_URL = "https://github.com/login/oauth/access_token";
|
|
10480
|
-
var GITHUB_OAUTH_SCOPES = "repo user:email";
|
|
10481
10480
|
|
|
10482
10481
|
// src/lib/auth.ts
|
|
10483
10482
|
async function resolveToken(flagToken) {
|
|
@@ -10761,7 +10760,7 @@ async function githubDeviceFlow() {
|
|
|
10761
10760
|
const res = await fetch(GITHUB_DEVICE_CODE_URL, {
|
|
10762
10761
|
method: "POST",
|
|
10763
10762
|
headers: { Accept: "application/json", "Content-Type": "application/x-www-form-urlencoded" },
|
|
10764
|
-
body: form({ client_id: GITHUB_CLIENT_ID
|
|
10763
|
+
body: form({ client_id: GITHUB_CLIENT_ID })
|
|
10765
10764
|
});
|
|
10766
10765
|
if (!res.ok) {
|
|
10767
10766
|
return { ok: false, error: `GitHub device-code request failed (HTTP ${res.status})` };
|
|
@@ -17081,7 +17080,7 @@ function registerTelemetryCommands(program2) {
|
|
|
17081
17080
|
}
|
|
17082
17081
|
|
|
17083
17082
|
// src/cli.ts
|
|
17084
|
-
program.name("verity").description("CLI for Verity quality gate service").version("0.26.0-experimental.
|
|
17083
|
+
program.name("verity").description("CLI for Verity quality gate service").version("0.26.0-experimental.fb8a404").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr");
|
|
17085
17084
|
registerAuthCommands(program);
|
|
17086
17085
|
registerHooksCommands(program);
|
|
17087
17086
|
registerIntentCommands(program);
|
|
@@ -346,13 +346,15 @@ verity auth verify
|
|
|
346
346
|
verity auth register --project "PROJECT_NAME" --remote "GIT_REMOTE_URL"
|
|
347
347
|
```
|
|
348
348
|
|
|
349
|
-
Registration is **provider-gated** (GitHub today): the CLI runs a GitHub
|
|
349
|
+
Registration is **provider-gated** (GitHub today): the CLI runs a GitHub App
|
|
350
350
|
**device flow** ("open https://github.com/login/device and enter code
|
|
351
351
|
WXYZ-1234"), proving the user has **write access** to the repo before the
|
|
352
|
-
service issues a token.
|
|
352
|
+
service issues a token. The GitHub App requests only read-only permissions
|
|
353
|
+
(Metadata + Email addresses); the resulting token is used once server-side to
|
|
354
|
+
check repo access and is never persisted.
|
|
353
355
|
|
|
354
|
-
When authenticated, `.verity/credentials` contains `token
|
|
355
|
-
|
|
356
|
+
When authenticated, `.verity/credentials` contains `token` and `service_url` —
|
|
357
|
+
all subsequent `verity` upload commands work.
|
|
356
358
|
|
|
357
359
|
---
|
|
358
360
|
|