Skip to content

NEW: @W-18146548@: Add new Flow Scanner rules - #376

Merged
stephen-carter-at-sf merged 3 commits into
devfrom
sc/UpdateFlowScanner
Oct 24, 2025
Merged

NEW: @W-18146548@: Add new Flow Scanner rules#376
stephen-carter-at-sf merged 3 commits into
devfrom
sc/UpdateFlowScanner

Conversation

@stephen-carter-at-sf

@stephen-carter-at-sf stephen-carter-at-sf commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

This will be for the November release and not the October release.

Comment thread packages/code-analyzer-flow-engine/src/engine.ts Outdated
@stephen-carter-at-sf
stephen-carter-at-sf marked this pull request as ready for review October 24, 2025 15:11
return QueryDescription(
query_id=self.query_id,
query_name=self.query_name,
query_description="This rule detects when there are CRUD flow elements within a loop (RecordLookups, RecordCreates, RecordUpdates, RecordDeletes). This rule does not trigger if the CRUD element is in a fault handler. These DB operations should be bulkified by using collections and the IN condition. This rule does not follow subflows.",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I manually fixed all the query_descriptions for now. Waiting on Robert to do this on his end.

Comment on lines +137 to +138
// The name of the flow scanner query. Unfortunately this is what shows up in the results instead of the id.
queryName: string,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In the near future Robert said he'll add queryId to the results files in addition to the queryName. So soon we'll be able to remove this queryName hopefully.

Comment on lines +140 to +141
// Should be true if the rule is queried by the --optional_queries flag and false if it is in the default preset
isOptional: boolean

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Soon Robert said he'll make all queries optional in a sense (where we can pass them all in - including the ones in the default preset)... so that we don't have to play the game of marking some as optional and some as required (and omit results after the fact). For now, this is our workaround.

Comment thread packages/code-analyzer-flow-engine/src/hardcoded-catalog.ts Outdated
@stephen-carter-at-sf
stephen-carter-at-sf merged commit be74ddc into dev Oct 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants