Skip to content

Commit

Permalink
Merge pull request #55 from Privado-Inc/dev
Browse files Browse the repository at this point in the history
Support for Read Dataflow Flag
  • Loading branch information
ojaswa1942 authored Sep 1, 2023
2 parents 22e9d21 + 7701358 commit 5eb0718
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Privado CLI
# Privado CLI

[![slack](https://img.shields.io/badge/slack-privado-brightgreen.svg?logo=slack)](https://join.slack.com/t/devprivops/shared_invite/zt-yk5zcxh3-gj8sS9w6SvL5lNYZLMbIpw)

Expand Down
8 changes: 7 additions & 1 deletion cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func defineScanFlags(cmd *cobra.Command) {
scanCmd.Flags().Bool("disable-this-filtering", false, "Experimental: If specified, filtering of flow using 'this filtering algorithm' will be avoided")
scanCmd.Flags().Bool("disable-flow-separation-by-data-element", false, "Experimental: If specified, filtering of flow using 'flow separation by data element algorithm' will be avoided")
scanCmd.Flags().Bool("disable-2nd-level-closure", false, "Experimental: If specified, 2nd level source derivation will be turned on")
scanCmd.Flags().Bool("disable-read-dataflow", false, "Experimental: If specified, read dataflow will be skipped")
scanCmd.Flags().Bool("enable-api-display", false, "Experimental: If specified, API display without domain for brute API tagger will be turned on")
scanCmd.Flags().Bool("generate-unresolved-name-report", false, "Flag to enable generation unresolved method name reports")
scanCmd.Flags().Bool("generate-unfiltered-report", false, "If specified, additionally generates an unfiltered flow report")
Expand All @@ -92,6 +93,7 @@ func scan(cmd *cobra.Command, args []string) {
disableThisFiltering, _ := cmd.Flags().GetBool("disable-this-filtering")
disableFlowSeperationByDataElement, _ := cmd.Flags().GetBool("disable-flow-separation-by-data-element")
disable2ndLevelClosure, _ := cmd.Flags().GetBool("disable-2nd-level-closure")
disableReadDataflow, _ := cmd.Flags().GetBool("disable-read-dataflow")
enableAPIDisplay, _ := cmd.Flags().GetBool("enable-api-display")
generateUnresolvedNameReport, _ := cmd.Flags().GetBool("generate-unresolved-name-report")
generateUnfilteredReport, _ := cmd.Flags().GetBool("generate-unfiltered-report")
Expand Down Expand Up @@ -139,7 +141,7 @@ func scan(cmd *cobra.Command, args []string) {
}
}

if !experimentalEnabled && (experimentalJavascriptEnabled || disableRunTimeSemantics || disableThisFiltering || disableFlowSeperationByDataElement || disable2ndLevelClosure || enableAPIDisplay) {
if !experimentalEnabled && (experimentalJavascriptEnabled || disableRunTimeSemantics || disableThisFiltering || disableFlowSeperationByDataElement || disable2ndLevelClosure || enableAPIDisplay || disableReadDataflow) {
exit(fmt.Sprint(
"Experimental features cannot be used without the `--enable-experiments` flag.\n\n",
"For more info, run: 'privado help'\n",
Expand Down Expand Up @@ -187,6 +189,10 @@ func scan(cmd *cobra.Command, args []string) {
commandArgs = append(commandArgs, "-d2lc")
}

if disableReadDataflow {
commandArgs = append(commandArgs, "-drd")
}

if enableAPIDisplay {
commandArgs = append(commandArgs, "-ead")
}
Expand Down

0 comments on commit 5eb0718

Please sign in to comment.