# Static Code Analysis Lab

**URL:** <https://forums.cybrary.it/t/static-code-analysis-lab/594529>\
**Category:** Content Discussion\
**Tags:** learning\
**Created:** [September 8, 2025, 4:57pm UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529 "2025-09-08T16:57:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DomesticFelidae1368](https://forums.cybrary.it/user_avatar/forums.cybrary.it/domesticfelidae1368/32/11_2.png) [@DomesticFelidae1368](https://forums.cybrary.it/u/DomesticFelidae1368)\
**Post date:** [September 8, 2025, 4:57pm UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/1 "2025-09-08T16:57:45Z")

</div>

I have restarted this lab 3 or 4 times. I can successfully run the gitlab pipeline, but it never talks back to SonarQube.. So step 15 never shows that it passed in the overview. Am I missing a step?

---

<div class="post-metadata">

**Author:** ![CalmQuail2332](https://forums.cybrary.it/user_avatar/forums.cybrary.it/calmquail2332/32/33622_2.png) [@CalmQuail2332](https://forums.cybrary.it/u/CalmQuail2332)\
**Post date:** [September 8, 2025, 8:38pm UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/2 "2025-09-08T20:38:24Z")

</div>

It sounds like it, but it’s hard to say exactly which step without seeing your work. If you want to record a video or post a series of screenshots showing your work in Part 2 here, we can take a look.

---

<div class="post-metadata">

**Author:** ![UnableWorm2461](https://forums.cybrary.it/user_avatar/forums.cybrary.it/unableworm2461/32/11_2.png) [@UnableWorm2461](https://forums.cybrary.it/u/UnableWorm2461)\
**Post date:** [April 5, 2026, 3:32pm UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/3 "2026-04-05T15:32:53Z")

</div>

As of Easter Sunday 2026 this is still a problem. You can run the pipeline after applying the necessary edits to the gitlab-ci-yml code and get the pass like as seen below **however** it does not communicate with **SonarQube** for the overview analysis as this function is supposed to automatic after deploying and passing the pipeline process.

 ![passed](https://forums.cybrary.it/uploads/default/original/3X/2/3/239a542314cd6400d867dbb9702c6a6c0b4a8bc0.gif)

There’s definitely a problem with this lab no doubt. A **problem** with the pipeline between gitlab and sonarqube. Now when you build to deploy pipeline you get the window below.

 ![new-problem](https://forums.cybrary.it/uploads/default/original/3X/6/6/6650441ce68ee339d57e172f0abad72d407cb7bf.gif)

---

<div class="post-metadata">

**Author:** ![UnableWorm2461](https://forums.cybrary.it/user_avatar/forums.cybrary.it/unableworm2461/32/11_2.png) [@UnableWorm2461](https://forums.cybrary.it/u/UnableWorm2461)\
**Post date:** [April 5, 2026, 7:50pm UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/4 "2026-04-05T19:50:00Z")

</div>

And this is the only result from snapshot above after attempting pipeline build.

 ![test](https://forums.cybrary.it/uploads/default/original/3X/4/b/4bea6dc836b6729237099ba48d3a7f7724172288.gif)

---

<div class="post-metadata">

**Author:** ![JosephWhite](https://forums.cybrary.it/user_avatar/forums.cybrary.it/josephwhite/32/2407_2.png) [@JosephWhite](https://forums.cybrary.it/u/JosephWhite)\
**Post date:** [April 5, 2026, 8:39pm UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/5 "2026-04-05T20:39:55Z")

</div>

I have asked the instructor to chime in. Thank you for your patience.

---

<div class="post-metadata">

**Author:** ![raggetd](https://forums.cybrary.it/user_avatar/forums.cybrary.it/raggetd/32/22425_2.png) [@raggetd](https://forums.cybrary.it/u/raggetd)\
**Post date:** [April 6, 2026, 7:20pm UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/6 "2026-04-06T19:20:34Z")

</div>

Hey @UnableWorm2461!

Sorry to hear about your troubles! And I’m doubly sorry to tell you I don’t have an immediate answer, since I’m currently experiencing the common troubleshooter’s ailment of: “_it works for me every time._”  
Welp – it’s time we team up and figure this one out together. And to that end, a few questions/requests:

1. Can you confirm your .gitlab-ci.yml looks exactly like the screenshot in `Part 2: Step 11`? That screenshot shows the entirety of the file – nothing is truncated. Here is the code it shows, for easy reference. Your file should look _exactly_ like this.

```yaml
image: 
    name: sonarsource/sonar-scanner-cli:11
    entrypoint: [""]
 
variables:
  SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
  GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
 
stages:
  - sonarqube-check
 
sonarqube-check:
  stage: sonarqube-check
 
  script: 
    - sonar-scanner -Dsonar.host.url="${SONAR_HOST_URL}"
  allow_failure: true
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
    - if: $CI_COMMIT_BRANCH == 'master'
    - if: $CI_COMMIT_BRANCH == 'main'
    - if: $CI_COMMIT_BRANCH == 'develop'

```

1. What do you see in your SonarQube Noterdamn project after running your GitLab pipeline? I want to get an idea of _exactly_ what this failure looks like. For example, in my current session, if I navigate to the Noterdamn project in SonarQube after a successful run, I see this:

Sorry for being so _needy_! Just eager to get this sorted for you, and more information gives me more power.

Thanks @UnableWorm2461!

- Raggetd

---

<div class="post-metadata">

**Author:** ![UnableWorm2461](https://forums.cybrary.it/user_avatar/forums.cybrary.it/unableworm2461/32/11_2.png) [@UnableWorm2461](https://forums.cybrary.it/u/UnableWorm2461)\
**Post date:** [April 7, 2026, 11:42pm UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/7 "2026-04-07T23:42:11Z")

</div>

This is the code before the next steps. Sowing entire code.

 ![before](https://forums.cybrary.it/uploads/default/original/3X/6/2/62a1a65b727b3dbe4e3680805c431e189f1c43de.gif)

This is after

 ![after](https://forums.cybrary.it/uploads/default/original/3X/e/1/e16fe858a6f01f1358160bac327c15668b769b11.gif)

Labs-screen shot

 ![labs-screenshot](https://forums.cybrary.it/uploads/default/original/3X/9/d/9d0e8f5cfcea0fb808ef07d7a0b38917fa0cc105.gif)

Pushing code

 ![pushing](https://forums.cybrary.it/uploads/default/original/3X/c/f/cfb2c6eb76ae8ab78b457312d54c830727b6a536.gif)

Pipeline pass

 ![GREEN-PIPELINE-PASS](https://forums.cybrary.it/uploads/default/original/3X/3/d/3dcb69d998c1d2c2f9555382708f99b507ed61a6.png)

SonarQube page

 ![sonarqube](https://forums.cybrary.it/uploads/default/original/3X/0/7/078ec517900f2c2cf97956d9adb9093e91409b2a.jpeg)

---

<div class="post-metadata">

**Author:** ![UnableWorm2461](https://forums.cybrary.it/user_avatar/forums.cybrary.it/unableworm2461/32/11_2.png) [@UnableWorm2461](https://forums.cybrary.it/u/UnableWorm2461)\
**Post date:** [April 8, 2026, 12:27am UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/8 "2026-04-08T00:27:58Z")

</div>

Second-attempt on gitlab-ci.yml code

 ![second-attempt](https://forums.cybrary.it/uploads/default/original/3X/7/5/75943083223437b73669f516c55030171d549e2f.png)

This is the end result

 ![pipeline2](https://forums.cybrary.it/uploads/default/original/3X/d/4/d4c8e98ce47f1d255408d01bdc32601536766a5e.jpeg)

---

<div class="post-metadata">

**Author:** ![UnableWorm2461](https://forums.cybrary.it/user_avatar/forums.cybrary.it/unableworm2461/32/11_2.png) [@UnableWorm2461](https://forums.cybrary.it/u/UnableWorm2461)\
**Post date:** [April 8, 2026, 12:49am UTC](https://forums.cybrary.it/t/static-code-analysis-lab/594529/9 "2026-04-08T00:49:07Z")

</div>

For the gitlab-ci.yml code all lines below 23 were deleted.

 ![below-line23](https://forums.cybrary.it/uploads/default/original/3X/8/2/82b59e262aac29468496d2753086494d71b861b7.jpeg)

That helped a lot. A eureka moment

 ![eureka](https://forums.cybrary.it/uploads/default/original/3X/2/3/237fc67309bbb58d0079babb5fe04b80f3ae8ad8.jpeg)
