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: git material url sanitised #4742

Merged
merged 5 commits into from
Mar 7, 2024
Merged

fix: git material url sanitised #4742

merged 5 commits into from
Mar 7, 2024

Conversation

Ash-exp
Copy link
Contributor

@Ash-exp Ash-exp commented Mar 5, 2024

Description

Currently the user given git material (git repo url) is directly saved into database. If the user has given an additional trailing slash to the git material, in case PR based/ Tag based CI; we get the web-hook payload with the git repo url and we search the exact url in the database. For this case the unsanitized git material url (user given) will fail to match.This PR will fix this issue.

Fixes #4661

How Has This Been Tested?

  • SSH git material
  • Https git material

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


Copy link

gitguardian bot commented Mar 6, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9498692 Triggered Generic Password 5af4ee9 pkg/gitops/GitOpsConfigService.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

Copy link

sonarcloud bot commented Mar 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Ash-exp Ash-exp merged commit 54fa2d9 into main Mar 7, 2024
4 checks passed
@Ash-exp Ash-exp deleted the fix-material-url-sanitised branch March 7, 2024 06:12
raunit-verma pushed a commit to raunit-verma/devtron that referenced this pull request Mar 11, 2024
* fix: git material url sanitised

* renamed method

---------

Co-authored-by: ShashwatDadhich <dadhichshashwat1808@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR:Ready-to-Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Not able to fetch commit when build type is tag creation
3 participants