Skip to content

Add custom env vars support#1

Merged
lkstrp merged 2 commits intomainfrom
custom-env-vars
May 4, 2026
Merged

Add custom env vars support#1
lkstrp merged 2 commits intomainfrom
custom-env-vars

Conversation

@KristijanFaust-OET
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Member

@lkstrp lkstrp left a comment

Choose a reason for hiding this comment

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

Thanks @KristijanFaust-OET !

My main concern is making it a bit more strict on which env vars can be passed. See comment. Otherwise could you add/ update the tests? They don't run in the CI yet, but we have some

Comment thread app/models.py Outdated

from pydantic import BaseModel, Field, field_validator

_VALID_ENV_VAR_NAME = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't that a bit too wide? I wouldn't say this project is currently hardened at all, but not sure if we should open up overwriting all env vars. What do you think about even whitelisting specific env vars in the config? That would already be sufficient for OETC

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Totally agree. I went with the simplest implementation but whitelisting makes much more sense. Refactored in: dfd8f59

@lkstrp lkstrp merged commit c95caf7 into main May 4, 2026
5 checks passed
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