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

fix(jans-cli-tui): change according to new asset Document schema #9275

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

devrimyatar
Copy link
Contributor

closes #9274

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

Signed-off-by: Mustafa Baser <mbaser@mail.com>
@devrimyatar devrimyatar added kind-bug Issue or PR is a bug in existing functionality comp-jans-cli-tui Component affected by issue or PR labels Aug 26, 2024
@devrimyatar devrimyatar requested review from yuriyz and yurem August 26, 2024 17:51
Copy link

dryrunsecurity bot commented Aug 26, 2024

DryRun Security Summary

The pull request focuses on changes to the "Assets" feature, including renaming fields, input validation, and error handling, but it is important to review the entire codebase to ensure secure coding practices, particularly in areas related to file upload functionality and API interaction.

Expand for full summary

Summary:

The code changes in this pull request appear to be focused on the "Assets" feature of the application. The changes involve renaming several fields in the save_asset and read_asset functions, likely reflecting changes in the data structure or naming conventions used in the application.

From a security perspective, the changes include some positive practices, such as input validation for the 'description' and 'displayName' fields, and error handling mechanisms to provide meaningful feedback to the user. However, it is important to review the entire codebase and ensure that the application follows secure coding practices, particularly in areas related to file upload functionality and API interaction, to mitigate potential security risks.

Files Changed:

  • jans-cli-tui/cli_tui/plugins/130_assets/main.py:
    • The key 'jansService' is renamed to 'service' in the save_asset function.
    • The 'jansLevel', 'jansEnabled', and 'jansService' fields are renamed to 'level', 'enabled', and 'service', respectively, in the read_asset function.
    • The code checks if the 'description' and 'displayName' fields are filled before saving the asset, which is a good security practice.
    • The code allows users to upload asset files, and it is important to ensure that the file upload functionality is implemented securely.
    • The code interacts with the application's API to perform CRUD operations on the assets, and it is crucial to ensure that the API endpoints are properly secured and that the application follows best practices for API authentication and authorization.
    • The code includes error handling mechanisms to provide meaningful feedback to the user when a save operation fails, which is a good practice.

Code Analysis

We ran 9 analyzers against 1 file and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@yurem yurem enabled auto-merge (squash) August 26, 2024 17:52
Copy link

@yurem yurem merged commit 085675a into main Aug 26, 2024
12 checks passed
@yurem yurem deleted the jans-cli-tui-error-saving-assets-9274 branch August 26, 2024 19:38
yuriyz pushed a commit that referenced this pull request Nov 7, 2024
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Former-commit-id: 085675a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-cli-tui Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(jans-cli-tui): error saving assets
3 participants