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

feat(query): add --input-data option #3808

Merged
merged 7 commits into from
Jul 12, 2021

Conversation

felipe-avelar
Copy link
Contributor

Closes #3807

Proposed Changes

  • Added a way to users input some data to customize queries with their own data.
    This implementation will require to update queries that makes sense to customize received data, like passwords queries, for example.
    To use this feature, we must add data.<data_variable> on query and create a file data.json that will have all data variables as keys.
    To customize data, you need to use --input-data flag, pointing to a folder with files in the format <query_id>.json and replace ALL keys with your own values.

This will be documented as soon as this PR is merged to master

I submit this contribution under the Apache-2.0 license.

@felipe-avelar felipe-avelar added feature New feature community Community contribution go Pull requests that update Go code labels Jul 2, 2021
@felipe-avelar felipe-avelar added this to the Core Engineering milestone Jul 2, 2021
@felipe-avelar felipe-avelar self-assigned this Jul 2, 2021
@kicsbot
Copy link
Contributor

kicsbot commented Jul 2, 2021

Scan submitted to Checkmarx

@kicsbot
Copy link
Contributor

kicsbot commented Jul 2, 2021

Logo
Checkmarx SAST - Scan Summary & Details

Cx-SAST Summary

Total of 0 vulnerabilities
High 0 High
Medium 0 Medium
Low 0 Low
Info 0 Info

Violation Summary

No policy violation found

@rogeriopeixotocx rogeriopeixotocx removed the community Community contribution label Jul 2, 2021
Signed-off-by: Felipe Avelar <[email protected]>
@felipe-avelar felipe-avelar marked this pull request as draft July 5, 2021 08:33
@rogeriopeixotocx rogeriopeixotocx changed the title feat(query): Added input data option feat(query): add --input-data option Jul 5, 2021
@felipe-avelar felipe-avelar marked this pull request as ready for review July 6, 2021 08:30
Signed-off-by: Felipe Avelar <[email protected]>
Copy link
Contributor

@rogeriopeixotocx rogeriopeixotocx left a comment

Choose a reason for hiding this comment

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

looks good, just a few suggestions

docs/commands.md Outdated Show resolved Hide resolved
docs/dockerhub.md Outdated Show resolved Hide resolved
e2e/fixtures/assets/scan_help Outdated Show resolved Hide resolved
internal/console/scan.go Outdated Show resolved Hide resolved
pkg/engine/inspector.go Show resolved Hide resolved
pkg/engine/source/filesystem.go Show resolved Hide resolved
Copy link
Collaborator

@joaoReigota1 joaoReigota1 left a comment

Choose a reason for hiding this comment

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

LGTM

@rogeriopeixotocx rogeriopeixotocx merged commit f68de9f into master Jul 12, 2021
@rogeriopeixotocx rogeriopeixotocx deleted the feature/add-custom-data-input branch July 12, 2021 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inject custom data in queries
4 participants