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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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).

Unfortunately due to how variable and varargs work, these are better
done in QL
@egregius313 egregius313 requested a review from a team as a code owner August 29, 2024 18:24
@github-actions github-actions bot added the Go label Aug 29, 2024
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
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
@owen-mc
Copy link
Contributor

owen-mc commented Sep 4, 2024

Looks like my suggestion needs reformatting.

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