Skip to content

fix: require SECRET_KEY and harden auth check - #7

Open
victalejo wants to merge 1 commit into
swiftwave-org:mainfrom
victalejo:main
Open

victalejo wants to merge 1 commit into
swiftwave-org:mainfrom
victalejo:main

Conversation

@victalejo

Copy link
Copy Markdown

Summary

  • Fix auth bypass: cuando SECRET_KEY no estaba seteada, os.getenv devolvía None y una request sin header Authorization también daba None, así que la comparación != pasaba y cualquiera accedía al endpoint /.
  • Fail-fast al arrancar si SECRET_KEY no está en el entorno, alineado con los checks existentes de RPM_BASE_URL / DEB_BASE_URL.
  • Defensa en profundidad en el handler: rechaza si SECRET_KEY está vacío o el header Authorization falta, antes de comparar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant