Skip to content

✨(configuration) add configuration Value to support file path in environment #15

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

Conversation

soyouzpanda
Copy link
Contributor

Related to suitenumerique/docs#912 and suitenumerique/docs#909

This supports use of environment variables that either reference a value or a path to file containing the value. This is useful for secrets, to avoid the secret to be in a world-readable environment file.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for environment variables that can reference either a value or the path to a file containing the value, which is particularly useful for securing secrets. Key changes include new tests for SecretFileValue behavior, a new SecretFileValue class in the configuration module, and an updated dependency in pyproject.toml to include django‑configurations.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
tests/configuration/test_secret_file.py Introduces tests validating different ways to supply secret values.
tests/configuration/init.py Provides a configuration tests initialization file.
src/lasuite/configuration/values.py Implements SecretFileValue to support both file path and direct env values.
pyproject.toml Adds dependency for django‑configurations to support this feature.
Files not reviewed (1)
  • tests/configuration/test_secret: Language not supported

@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch from 451f2bf to fd2a3a7 Compare April 29, 2025 14:21
@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch from fd2a3a7 to 1afc245 Compare April 29, 2025 15:22
@lunika
Copy link
Member

lunika commented May 9, 2025

You should run make lint on your machine to see what you have to fix.

@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch 2 times, most recently from d54f4c6 to 8567894 Compare May 12, 2025 12:47
@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch from 8567894 to 080c9a4 Compare May 20, 2025 13:41
@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch 2 times, most recently from 62a33db to 1ee6593 Compare May 20, 2025 13:47
This supports use of environment variables that either reference
a value or a path to file containing the value. This is useful for
secrets, to avoid the secret to be in a world-readable environment
file.
@soyouzpanda soyouzpanda force-pushed the feature/configuration-environment-secrets branch from 1ee6593 to ea908d9 Compare May 20, 2025 13:48
@lunika lunika merged commit 06dc5aa into suitenumerique:main May 20, 2025
6 checks passed
@soyouzpanda soyouzpanda deleted the feature/configuration-environment-secrets branch May 20, 2025 13:51
lunika added a commit that referenced this pull request May 20, 2025
Added

- ✨(configuration) add configuration Value to support file path
  in environment #15

Changed

- ♻️(malware_detection) retry getting analyse result sooner
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.

3 participants