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

feat(jans-cedarling): add env variable for python #10115

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

SafinWasi
Copy link
Contributor

Prepare


Description

Target issue

closes #10114

Implementation Details

Adds environment variable CEDARLING_LOCAL_POLICY_STORE for the python example. Not providing this variable will cause the script to print an error and exit.


Test and Document the changes

N/A

Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with docs: to indicate documentation changes or if the below checklist is not selected.

  • I confirm that there is no impact on the docs due to the code changes in this PR.

Copy link

dryrunsecurity bot commented Nov 11, 2024

DryRun Security Summary

The pull request primarily focuses on improving the installation and setup instructions for the cedarling_python project, as well as enhancing the handling of the policy store configuration in the example.py file, which now reads the policy store location from an environment variable, improving the flexibility and security of the application.

Expand for full summary

Summary:

The code changes in this pull request primarily focus on improving the installation and setup instructions for the cedarling_python project, as well as enhancing the handling of the policy store configuration in the example.py file. The changes to the README.md file provide more detailed and comprehensive instructions for setting up the development environment, while the changes to the example.py file ensure that the policy store location is read from an environment variable, improving the flexibility and security of the application.

From an application security perspective, the changes do not introduce any obvious security concerns. The README.md file updates are documentation-related and do not contain any code that could introduce vulnerabilities. The changes to the example.py file, while focused on improving security, still require careful review to ensure that the environment variable value is properly sanitized and validated to prevent potential injection vulnerabilities. Overall, the changes appear to be a positive step towards enhancing the security and maintainability of the cedarling_python project.

Files Changed:

  1. jans-cedarling/bindings/cedarling_python/README.md: The changes to this file focus on improving the installation and setup instructions for the cedarling_python project, making them more comprehensive and easier to follow. The changes include updates to the prerequisites, installation steps, and additional information for developers.

  2. jans-cedarling/bindings/cedarling_python/example.py: The changes to this file focus on enhancing the handling of the policy store configuration. The code now reads the policy store location from an environment variable, improving the flexibility and security of the application. The changes also include proper file handling using the with open() context manager.

Code Analysis

We ran 9 analyzers against 2 files and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@mo-auto mo-auto added area-documentation Documentation needs to change as part of issue or PR comp-jans-cedarling Touching folder /jans-cedarling kind-feature Issue or PR is a new feature request labels Nov 11, 2024
olehbozhok
olehbozhok previously approved these changes Nov 11, 2024
Copy link
Contributor

@olehbozhok olehbozhok left a comment

Choose a reason for hiding this comment

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

Looks OK to me
I will update example policy file later, or it will be updated in #10098

@nynymike nynymike self-requested a review November 11, 2024 20:05
nynymike
nynymike previously approved these changes Nov 11, 2024
@moabu moabu merged commit 2fad780 into main Nov 12, 2024
15 checks passed
@moabu moabu deleted the feat-jans-cedarling-env-python branch November 12, 2024 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Documentation needs to change as part of issue or PR comp-jans-cedarling Touching folder /jans-cedarling kind-feature Issue or PR is a new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(jans-cedarling): add loading policy store from environment variable on python
5 participants