Fix CodeQL security alerts: add CI permissions and document OAuth CSRF bypass

This commit is contained in:
End 2026-03-29 16:28:45 -07:00
parent 6221afd2e9
commit a988aed4b3
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View file

@ -5,6 +5,9 @@ on:
push:
branches: [ main ]
permissions:
contents: read
jobs:
scan_ruby:
runs-on: ubuntu-latest

View file

@ -1,7 +1,9 @@
# frozen_string_literal: true
class SessionsController < ApplicationController
skip_forgery_protection only: :callback
# OAuth callback originates from external IdP, not our forms.
# CSRF protection is handled by OmniAuth's state parameter validation.
skip_forgery_protection only: :callback # codeql[rb/csrf-protection-disabled]
def login
redirect_to "/auth/oidc", allow_other_host: true