-
-
Notifications
You must be signed in to change notification settings - Fork 115
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(cli): Add import sub commmand for project. #594
base: develop
Are you sure you want to change the base?
feat(cli): Add import sub commmand for project. #594
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
These are the initial changes, and some updates might be required. |
…andling in import from env; update method and type names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried importing the env file. seems like anything that gets enclosed in "" gets detected as a variable. We need to strip values off "" before scanning
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #594 +/- ##
===========================================
+ Coverage 91.71% 99.76% +8.05%
===========================================
Files 111 71 -40
Lines 2510 432 -2078
Branches 469 3 -466
===========================================
- Hits 2302 431 -1871
+ Misses 208 1 -207
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
User description
Description
@keyshade/secret-scan
: Create a function to detect secrets and variables from JS object containing keys and values.cli
: Add feature to import secrets and variables from .env file into Keyshade.Fixes #502
Fixes #503
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
Enhancement
Description
keyshade project import
to import secrets and variables from .env filesdetectObject
function to analyze key-value pairsChanges walkthrough 📝
import.project.ts
Add import command for environment secrets and variables
apps/cli/src/commands/project/import.project.ts
index.ts
Add function to detect secrets from objects
packages/secret-scan/src/index.ts
detectObject
method to scan key-value pairsproject.command.ts
Register import command in project commands
apps/cli/src/commands/project.command.ts
index.d.ts
Add types for secret detection results
packages/secret-scan/src/types/index.d.ts
detect-object.test.ts
Add tests for secret detection from objects
packages/secret-scan/src/test/detect-object.test.ts
package.json
Add dotenv package dependency
apps/cli/package.json