Skip to content

RB: make the alert messages of taint-tracking queries more consistent #10304

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

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

erik-krogh
Copy link
Contributor

I just did this for Python and JavaScript.

I'm rewriting alert messages for the taint tracking queries:

  • I tried to fit the message to the template: This path depends on a user-provided value.
  • If that didn't work I tried User-provided value flows to this location and is used in a path.

I also generally tried to use "this location" instead of "here".
I tried to formulate messages to use "depends on" and use the term "a user-provided value".

The previous change-note for changing the alert messages still cover this PR.

@github-actions github-actions bot added the Ruby label Sep 5, 2022
@erik-krogh erik-krogh added the no-change-note-required This PR does not need a change note label Sep 9, 2022
@erik-krogh erik-krogh marked this pull request as ready for review September 9, 2022 10:47
@erik-krogh erik-krogh requested a review from a team as a code owner September 9, 2022 10:47
@erik-krogh erik-krogh added the ready-for-doc-review This PR requires and is ready for review from the GitHub docs team. label Sep 9, 2022
@calumgrant calumgrant requested a review from aibaars September 12, 2022 08:33
aibaars
aibaars previously approved these changes Sep 12, 2022
Copy link
Contributor

@aibaars aibaars left a comment

Choose a reason for hiding this comment

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

This looks good to me. I have some comments, but i don't feel strongly about them ,so feel free to ignore me ;-)

Comment on lines 25 to 26
select sink.getNode(), source, sink, "This path depends on $@.", source.getNode(),
"a user-provided value"
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit: do we want the have the a as part of the link text or not?

Suggested change
select sink.getNode(), source, sink, "This path depends on $@.", source.getNode(),
"a user-provided value"
select sink.getNode(), source, sink, "This path depends on a $@.", source.getNode(),
"user-provided value"

I don't think it matters too much, but there might be some W3C recommendation about link texts. In the past I've read guidelines like, link text should be concise, descriptive, and ideally start with important words first (to accommodate screen readers that present lists of links on a page in alphabetical order). Arguably user provided value isn't much more descriptive than a user provided value , and only marginally shorter.

The same phrase is used in many places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't want the article in the link text, you're right about the W3C recommendation 👍
The W3C guidance on link texts even have an example where the article is left out of the link text.

I've included the article in basically every link-text I've rewritten as part of these PRs, I should fix that.
I'll update this PR for now, but I'll wait with updating the other languages.
(And maybe write a QL-for-QL query for it).

Comment on lines 23 to 24
select sink.getNode(), source, sink, "$@ is logged here.", source.getNode(),
"Sensitive data returned by " + source.getNode().(Source).describe()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should keep the link text concise.

Suggested change
select sink.getNode(), source, sink, "$@ is logged here.", source.getNode(),
"Sensitive data returned by " + source.getNode().(Source).describe()
select sink.getNode(), source, sink, "Sensitive data returned by $@ is logged here.", source.getNode(),
source.getNode().(Source).describe()

Comment on lines 24 to 25
select sink.getNode(), source, sink, "$@ is stored here.", source.getNode(),
"Sensitive data returned by " + source.getNode().(Source).describe()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
select sink.getNode(), source, sink, "$@ is stored here.", source.getNode(),
"Sensitive data returned by " + source.getNode().(Source).describe()
select sink.getNode(), source, sink, "Sensitive data returned by $@ is stored here.", source.getNode(),
source.getNode().(Source).describe()

Copy link
Contributor

@hubwriter hubwriter left a comment

Choose a reason for hiding this comment

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

Docs Team review.
LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants