Report inconclusive Slack placeholder-code checks accurately
This commit is contained in:
@@ -17,7 +17,7 @@ jobs:
|
||||
test -z "$(gofmt -l cmd internal)"
|
||||
go test -mod=readonly ./...
|
||||
go build -mod=readonly -o bin/foundry ./cmd/foundry
|
||||
- name: Verify configured Slack client credentials
|
||||
- name: Check Slack OAuth configuration and endpoint
|
||||
if: gitea.event_name == 'push'
|
||||
env:
|
||||
SLACK_CLIENT_ID: ${{ secrets.SLACK_CLIENT_ID }}
|
||||
@@ -57,6 +57,10 @@ jobs:
|
||||
if actual in ("invalid_code", "invalid_grant") and control in ("bad_client_secret", "invalid_client"):
|
||||
print("Slack client credentials accepted; invalid-secret negative control rejected")
|
||||
print("A real user authorization is still required to verify the complete login")
|
||||
elif actual in ("invalid_code", "invalid_grant") and control in ("invalid_code", "invalid_grant"):
|
||||
print("Both Slack Actions secrets are available and the OAuth endpoint is reachable")
|
||||
print("Slack rejected the placeholder code before validating the client secret")
|
||||
print("Client-secret validity requires a real user authorization; this is not a complete login test")
|
||||
else:
|
||||
known = {"invalid_client_id", "bad_client_secret", "invalid_client", "invalid_code",
|
||||
"invalid_grant", "bad_redirect_uri", "accesslimited", "ratelimited"}
|
||||
|
||||
Reference in New Issue
Block a user