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

Integration test for secret ops #1408

Merged
merged 20 commits into from
Feb 20, 2024

Conversation

akhilmhdh
Copy link
Member

Description 📣

  1. This PR adds api integration test for all secret operations from external entities which includes dashboard, service token (cli) and identity token(sdk)
  2. Fixed seed file issue faced when running seeding
  3. Resolved a small bug in secret deletion
  4. Added ci for running integration test

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

Copy link

gitguardian bot commented Feb 15, 2024

⚠️ GitGuardian has uncovered 7 secrets 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 secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- Generic High Entropy Secret 678306b backend/src/db/seed-data.ts View secret
- Generic High Entropy Secret f09c48d backend/src/db/seed-data.ts View secret
- Generic Private Key ccaa9fd backend/e2e-test/routes/v3/secrets.spec.ts View secret
- Generic Private Key ccaa9fd backend/e2e-test/routes/v3/secrets.spec.ts View secret
- Generic Private Key 35d589a backend/e2e-test/routes/v1/identity.spec.ts View secret
- Generic Private Key 2996efe backend/e2e-test/routes/v1/identity.spec.ts View secret
- Generic High Entropy Secret d428fd0 .env.test.example 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 secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  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!

@akhilmhdh akhilmhdh force-pushed the feat/integration-test-secret-ops branch from fe257ee to 793440f Compare February 15, 2024 15:00
Copy link
Collaborator

@DanielHougaard DanielHougaard left a comment

Choose a reason for hiding this comment

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

Great work, I left a few comments for you!

.github/workflows/run-backend-tests.yml Show resolved Hide resolved
backend/e2e-test/routes/v3/secrets.spec.ts Outdated Show resolved Hide resolved
backend/src/db/knexfile.ts Show resolved Hide resolved
backend/src/db/seed-data.ts Outdated Show resolved Hide resolved
backend/src/server/app.ts Show resolved Hide resolved
.env.test.example Outdated Show resolved Hide resolved
Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

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

Just some structuring comments

.github/workflows/run-backend-tests.yml Outdated Show resolved Hide resolved
.github/workflows/run-backend-tests.yml Show resolved Hide resolved
.github/workflows/run-backend-tests.yml Show resolved Hide resolved
backend/e2e-test/vitest-environment-knex.ts Show resolved Hide resolved
backend/src/db/seed-data.ts Show resolved Hide resolved
backend/e2e-test/routes/v1/identity.spec.ts Outdated Show resolved Hide resolved
backend/e2e-test/routes/v3/secrets.spec.ts Show resolved Hide resolved
backend/e2e-test/routes/v1/login.spec.ts Show resolved Hide resolved
Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

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

lgtm

@maidul98 maidul98 merged commit 7db829b into Infisical:main Feb 20, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants