b1tg / codeql-uboot

https://lab.github.com/githubtraining/codeql-u-boot-challenge-(cc++)
MIT License
0 stars 0 forks source link

Step 8 - Changing the selected output #8

Closed github-learning-lab[bot] closed 3 years ago

github-learning-lab[bot] commented 3 years ago

Step 8: Changing the selected output

In the previous step, you found invocations of the macros we are interested in. Modify your query to find the top-level expressions these macro invocations expand to.

Note: An expression is a source code element that can have a value at runtime. Invoking a macro can bring various source code elements into scope, including expressions.

github-learning-lab[bot] commented 3 years ago

:keyboard: Activity: Find the expressions that correspond to macro invocations

As before, if you don't know how a piece of source code is represented in the library, you can use the auto-completion and contextual help to discover the classes and predicates you need.

  1. Edit the file 8_macro_expressions.ql with the previous query
  2. Use the getExpr() predicate in the select section, to return the wanted expressions.
  3. Once you're happy with the results, submit your solution.
github-learning-lab[bot] commented 3 years ago

Ooops! The query you submitted in 7ffbb668964c9f90f1249ef7b5853306100cd938 didn't find the right results. Please take a look at the comment and try again.

To submit a new iteration of your query, you just have to push a new commit to the same branch (main or the PR branch).

github-learning-lab[bot] commented 3 years ago

Ooops! The query you submitted in 35993177174110ddfa5c1e7e5ddbde1b315afa75 didn't find the right results. Please take a look at the comment and try again.

To submit a new iteration of your query, you just have to push a new commit to the same branch (main or the PR branch).

github-learning-lab[bot] commented 3 years ago

Congratulations, looks like the query you introduced in c926dc987c79116a425f005cdb101293e05aca50 finds the correct results!

If you created a pull request, merge it.

Let's continue to the next step.