Skip to content

Code Security Report: 1 high severity findings, 7 total findings [develop] #98

@mend-for-github-com

Description

@mend-for-github-com

Code Security Report

Scan Metadata

Latest Scan: 2025-01-15 05:58pm
Total Findings: 7 | New Findings: 0 | Resolved Findings: 0
Tested Project Files: 292
Detected Programming Languages: 3 (Python*, JavaScript / TypeScript*, C/C++ (Beta))

  • Check this box to manually trigger a scan

Finding Details

SeverityVulnerability TypeCWEFileData FlowsDetected
HighDOM Based Cross-Site Scripting

CWE-79

github_issue_links.js:6

12025-01-15 06:01pm
Vulnerable Code

window.onload = function () {
const link = document.createElement("a");
link.classList.add("muted-link");
link.classList.add("github-issue-link");
link.text = "Give feedback";
link.href = (

1 Data Flow/s detected

+ `*Reported+from%3A+${location.href}*`

"https://github.com/canonical/cloud-init/issues/new?"

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior DOM Based Cross-Site Scripting Training

● Videos

   ▪ Secure Code Warrior DOM Based Cross-Site Scripting Video

 
MediumHardcoded Password/Credentials

CWE-798

DataSourceCloudStack.py:71

12025-01-15 06:01pm
Vulnerable Code

if password == "bad_request":

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Hardcoded Password/Credentials Training

● Videos

   ▪ Secure Code Warrior Hardcoded Password/Credentials Video

● Further Reading

   ▪ OWASP Top Ten 2017 A3: Sensitive Data Exposure

   ▪ OWASP Top Ten Proactive Controls 2018 C8: Protect Data Everywhere

   ▪ OWASP Top Ten 2021 A02: Cryptographic Failures

 
LowLog Forging

CWE-117

mock-meta.py:386

12025-01-15 06:01pm
Vulnerable Code

}
return functools.partial(base_func, **kwargs)
def _do_response(self):
who = self.client_address
log.info("Got a call from %s for path %s", who, self.path)

1 Data Flow/s detected

log.info("Got a call from %s for path %s", who, self.path)

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Log Forging Training

● Videos

   ▪ Secure Code Warrior Log Forging Video

● Further Reading

   ▪ OWASP Log Forging

 
LowWeak Hash Strength

CWE-328

util.py:1877

12025-01-15 06:01pm
Vulnerable Code

"""Hash the content of a binary buffer using SHA1.
@param f: buffered binary stream to hash.
@return: digested data as bytes.
"""
hasher = hashlib.sha1()

1 Data Flow/s detected

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Weak Hash Strength Training

● Videos

   ▪ Secure Code Warrior Weak Hash Strength Video

● Further Reading

   ▪ OWASP Cryptographic Storage Cheat Sheet

   ▪ OWASP Transport Layer Protection Cheat Sheet

   ▪ OWASP Password Storage Cheat Sheet

   ▪ OWASP Using a broken or risky cryptographic algorithm article

 
LowWeak Hash Strength

CWE-328

util.py:1887

12025-01-15 06:01pm
Vulnerable Code

cloud-init/cloudinit/util.py

Lines 1882 to 1887 in 5c771b5

"""Hash the content of a binary buffer using SHA1.
@param f: buffered binary stream to hash.
@return: digested data as bytes.
"""
hasher = hashlib.sha1()

1 Data Flow/s detected

hasher = hashlib.sha1()

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Weak Hash Strength Training

● Videos

   ▪ Secure Code Warrior Weak Hash Strength Video

● Further Reading

   ▪ OWASP Cryptographic Storage Cheat Sheet

   ▪ OWASP Transport Layer Protection Cheat Sheet

   ▪ OWASP Password Storage Cheat Sheet

   ▪ OWASP Using a broken or risky cryptographic algorithm article

 
LowWeak Hash Strength

CWE-328

util.py:1877

12025-01-15 06:01pm
Vulnerable Code

"""Hash the content of a binary buffer using SHA1.
@param f: buffered binary stream to hash.
@return: digested data as bytes.
"""
hasher = hashlib.sha1()

1 Data Flow/s detected

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Weak Hash Strength Training

● Videos

   ▪ Secure Code Warrior Weak Hash Strength Video

● Further Reading

   ▪ OWASP Cryptographic Storage Cheat Sheet

   ▪ OWASP Transport Layer Protection Cheat Sheet

   ▪ OWASP Password Storage Cheat Sheet

   ▪ OWASP Using a broken or risky cryptographic algorithm article

 
LowLog Forging

CWE-117

mock-meta.py:356

12025-01-15 06:01pm
Vulnerable Code

func_mapping = {
"user-data": user_fetcher.get_data,
"meta-data": meta_fetcher.get_data,
}
segments = [piece for piece in path.split("/") if len(piece)]
log.info("Received segments %s", segments)

1 Data Flow/s detected

func = self._find_method(self.path)

def _find_method(self, path):

segments = [piece for piece in path.split("/") if len(piece)]

log.info("Received segments %s", segments)

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Log Forging Training

● Videos

   ▪ Secure Code Warrior Log Forging Video

● Further Reading

   ▪ OWASP Log Forging

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions