Skip to content

feat: add default propagators - #2740

Draft
MaxAtoms wants to merge 1 commit into
staging/validity-lintingfrom
2687-function-classification
Draft

feat: add default propagators#2740
MaxAtoms wants to merge 1 commit into
staging/validity-lintingfrom
2687-function-classification

Conversation

@MaxAtoms

Copy link
Copy Markdown
Collaborator

No description provided.

@MaxAtoms
MaxAtoms requested a review from EagleoutIce August 25, 2026 19:45
@MaxAtoms MaxAtoms self-assigned this Aug 25, 2026
public withDefaultPropagators(argProps: ArgProps = ArgProp.Alias | ArgProp.Value | ArgProp.Shape): this {
const idx = BuiltInIndex.default();
for(const i of idx.pure) {
const sig = idx.entries.find(e => Identifier.matches(i, e.name))?.sig;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I did not use BuiltInIndex.get() to be namespace-save

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

revised in 2.15.2 its now supporting this

for(const i of idx.pure) {
const sig = idx.entries.find(e => Identifier.matches(i, e.name))?.sig;
if(!sig){
continue;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

What should we do if there is no signature information?
Simply join all incoming taints, if there are any?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

go to top? 🙈 like then it is a general unknown and it should be at least treated like a sigdb entry with no more info

argTaints: arg,
condition: (_, taints) => {
const taintDomains = taints.map(t => this.domain.create(t));
return AbstractDomain.joinAll(taintDomains).value as AbstractValue<Domain>;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I should probably make this customizable, as discussed

public withDefaultPropagators(argProps: ArgProps = ArgProp.Alias | ArgProp.Value | ArgProp.Shape): this {
const idx = BuiltInIndex.default();
for(const i of idx.pure) {
const sig = idx.entries.find(e => Identifier.matches(i, e.name))?.sig;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

revised in 2.15.2 its now supporting this

for(const i of idx.pure) {
const sig = idx.entries.find(e => Identifier.matches(i, e.name))?.sig;
if(!sig){
continue;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

go to top? 🙈 like then it is a general unknown and it should be at least treated like a sigdb entry with no more info

typeof path === 'string' && NetworkProtocolRegex.test(path) ? NetworkInput : FileInput;

export const securityAnalysis = new TaintAnalysisDefinition('security', securityDomain)
.withDefaultPropagators()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not the javascript event system suppressdefault 😭

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and i was hoping one could get taint-analysis semantic labels and then write:

.on(GeneralClass.PureComputer, ....)

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.

2 participants