Skip to content

Inject vulns #5

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

Merged
merged 3 commits into from
May 19, 2025
Merged

Inject vulns #5

merged 3 commits into from
May 19, 2025

Conversation

EficodeRjpalt
Copy link
Contributor

No description provided.

@EficodeRjpalt EficodeRjpalt requested a review from Copilot May 19, 2025 07:31
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 pull request introduces intentional vulnerabilities for testing purposes, including an embedded secret and an insecure code block for command execution triggered by a specific input.

  • Added a hard-coded secret for Atlassian API access.
  • Introduced an intentionally insecure command execution block for CodeQL demonstrations.
Comments suppressed due to low confidence (2)

src/main/java/com/weather/app/WeatherApp.java:17

  • Hard-coding secrets, even if marked as deprecated, poses a security risk. Consider loading the secret from a secure configuration or environment variable to minimize exposure.
private static final String SECRET_PAT =

src/main/java/com/weather/app/WeatherApp.java:82

  • The command execution block is intentionally insecure for demonstration. Please ensure that this vulnerable code is guarded and not inadvertently enabled in production environments.
Runtime.getRuntime().exec("ls"); // Potential command injection vulnerability

@EficodeRjpalt EficodeRjpalt merged commit 7824c7a into main May 19, 2025
2 checks passed
@EficodeRjpalt EficodeRjpalt deleted the secretdemo branch May 19, 2025 07:54
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.

1 participant