Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow any origins to pass request to skyvern backend by default; make the ALLOWED_ORIGINS configurable through environment #543

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Jul 3, 2024

🚀 This description was created by Ellipsis for commit 4c1c302

Summary:

Allow any origins by default and make allowed origins configurable via environment variables in skyvern/config.py and skyvern/forge/api_app.py.

Key points:

  • Updated skyvern/config.py to add ALLOWED_ORIGINS with a default value of [*].
  • Modified skyvern/forge/api_app.py to use SettingsManager.get_settings().ALLOWED_ORIGINS for CORS allow_origins configuration.
  • Allows any origin by default and makes allowed origins configurable via environment variables.

Generated with ❤️ by ellipsis.dev

… the ALLOWED_ORIGINS configurable through environment
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 4c1c302 in 32 seconds

More details
  • Looked at 39 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_HvS3TM3vz7ntomuA


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -31,6 +31,7 @@ class Settings(BaseSettings):
JSON_LOGGING: bool = False
LOG_LEVEL: str = "INFO"
PORT: int = 8000
ALLOWED_ORIGINS: list[str] = ["*"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting ALLOWED_ORIGINS to ['*'] by default can lead to significant security vulnerabilities by allowing any website to interact with your API. Consider restricting this to a more conservative set of origins, or ensure that this setting is appropriately configured in production environments to avoid security risks.

@wintonzheng wintonzheng merged commit 4a9b89f into main Jul 3, 2024
2 checks passed
@wintonzheng wintonzheng deleted the shu/make_CORS_configurable branch July 3, 2024 20:36
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.

2 participants