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

Go: Implement stdin models #17335

Merged

Conversation

egregius313
Copy link
Contributor

Adds source models for the stdin threat model.

These models are implemented in QL instead of MaD due to limitations in MaD:

  • MaD does not currently handle variable arguments as well as getAnImplicitVarargsArgument
  • MaD has a way to access fields on structs, but not variables in a package. (This is generally not that important, but it is necessary for modeling os.Stdin).

owen-mc
owen-mc previously approved these changes Sep 4, 2024
Copy link
Contributor

@owen-mc owen-mc 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. Only trivial comments.

go/ql/lib/semmle/go/frameworks/stdlib/Os.qll Outdated Show resolved Hide resolved
@owen-mc
Copy link
Contributor

owen-mc commented Sep 4, 2024

Looks like my suggestion needs reformatting.

egregius313 and others added 6 commits October 1, 2024 15:56
Unfortunately due to how variable and varargs work, these are better
done in QL
Co-authored-by: Owen Mansel-Chan <[email protected]>
Co-authored-by: Owen Mansel-Chan <[email protected]>
@egregius313 egregius313 force-pushed the egregius313/go/dataflow/models/stdin branch from 46c50b3 to f8335e6 Compare October 1, 2024 19:58
@egregius313 egregius313 requested a review from owen-mc October 9, 2024 15:55
@egregius313 egregius313 merged commit ade5686 into github:main Oct 14, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants