Let’s Get Certified
Module 05 / 07 · Code Security

Verify analysis inputs and interpret CodeQL results

Choose a scanning setup, trace a finding to its evidence and validate a proposed correction.

Establish what the analyzer actually examined

Default setup manages CodeQL analysis for supported repositories. Advanced setup lets maintainers specify languages, queries, build steps, events and schedules. A matrix can separate languages whose build requirements differ. If an external CI system already performs analysis, import its compatible SARIF report with the required authorization. Keep the tool identity and analysis category stable for each distinct analysis.

Read the rule, the location and any path shown in an alert. A path links evidence at different points in the program. Inspect the relevant code and its intended behavior, make the smallest correction that addresses the finding and test the behavior. Copilot Autofix can propose a change for supported alerts. Review the diff, run relevant tests and confirm that analysis of the updated revision resolves the finding.

If analysis slows after a query change, compare per-language run times at a similar revision. Confirm whether extra queries or a longer build explain the difference. Use representative repositories to evaluate the coverage and triage cost of a new query suite before rolling it out.

Read a tool status report

Open the repository’s code scanning alerts and follow the tool status link. Select the analyzer and inspect its recent run, languages and errors. If JavaScript shows broad coverage and Java shows zero, examine the Java configuration and build before interpreting its alert total. A CSV of analyzed files can help the Java owner check which sources the tool actually processed.

Worked case 1

The workflow is green after a build migration, but no current result appears for the service language. What would you inspect?

Check your reasoning

Match the workflow revision, selected language, analyzed build and report upload to the expected branch and tool. A passing build alone does not establish that the analyzer saw the service.

Worked case 2

The same analyzer reports two independent components at one revision. One result set seems to replace the other. What distinguishes them?

Check your reasoning

Assign a distinct stable analysis category to each component. Keep the category consistent across later runs of the same analysis and inspect the resulting tool status.

GitHub SARIF support · Read tool status · GH-500 skills outline

Related lesson in GitHub Actions. Find the first failing job and reproduce its inputs.

Practice with the recording

One repository needs a nonstandard build and a second already produces SARIF in external CI. How would you onboard their findings?

Check your reasoning

Use an appropriate CodeQL workflow for the build that needs customization. For the other repository, validate its supported SARIF output and upload it for the correct revision and analysis category. Verify scans on a known commit before enforcing a merge check.

Current GH-500 course · 1:14:53 · freeCodeCamp · GitHub Advanced Security course · 1:22:44

Apply the current exam objectives

For a suggested Copilot Autofix, read the finding, inspect the patch, run the affected tests and verify that the next analysis resolves the finding on the intended branch. A generated suggestion still needs a developer to establish that the revised behavior is correct.

Evaluating a suggested Copilot Autofix · 1:23:38

Coverage after a CI change

Compare default setup, an approved custom workflow and an external SARIF producer. Check language and build coverage, commit and branch identity, category and analysis age. If a job fails, inspect the analysis and upload stages independently.

Knowledge check

Verify analysis inputs and interpret CodeQL results quiz

Answer 3 questions. Check each answer for an explanation.