// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`workers/repository/init/vulnerability > detectVulnerabilityAlerts() > returns go alerts 1`] = `
[
  {
    "force": {
      "branchTopic": "{{{datasource}}}-{{{depNameSanitized}}}-vulnerability",
      "commitMessageSuffix": "[SECURITY]",
      "dependencyDashboardApproval": false,
      "groupName": null,
      "minimumReleaseAge": null,
      "prCreation": "immediate",
      "rangeStrategy": "update-lockfile",
      "schedule": [],
      "vulnerabilityFixStrategy": "lowest",
    },
    "isVulnerabilityAlert": true,
    "matchCurrentVersion": "< 1.8.3",
    "matchDatasources": [
      "go",
    ],
    "matchFileNames": [
      "go.mod",
    ],
    "matchPackageNames": [
      "foo",
    ],
    "prBodyNotes": [
      "### GitHub Vulnerability Alerts",
      "#### [abc]()

go",
    ],
    "vulnerabilityFixVersion": "1.8.3",
  },
]
`;

exports[`workers/repository/init/vulnerability > detectVulnerabilityAlerts() > returns maven alerts 1`] = `
[
  {
    "force": {
      "branchTopic": "{{{datasource}}}-{{{depNameSanitized}}}-vulnerability",
      "commitMessageSuffix": "[SECURITY]",
      "dependencyDashboardApproval": false,
      "groupName": null,
      "minimumReleaseAge": null,
      "prCreation": "immediate",
      "rangeStrategy": "update-lockfile",
      "schedule": [],
      "vulnerabilityFixStrategy": "lowest",
    },
    "isVulnerabilityAlert": true,
    "matchCurrentVersion": "(,2.7.9.4)",
    "matchDatasources": [
      "maven",
    ],
    "matchFileNames": [
      "pom.xml",
    ],
    "matchPackageNames": [
      "com.fasterxml.jackson.core:jackson-databind",
    ],
    "prBodyNotes": [
      "### GitHub Vulnerability Alerts",
      "#### [CVE-2018-12022](https://nvd.nist.gov/vuln/detail/CVE-2018-12022)

An issue was discovered in FasterXML jackson-databind prior to 2.7.9.4, 2.8.11.2, and 2.9.6. When Default Typing is enabled (either globally or for a specific property), the service has the Jodd-db jar (for database access for the Jodd framework) in the classpath, and an attacker can provide an LDAP service to access, it is possible to make the service execute a malicious payload.",
    ],
    "vulnerabilityFixVersion": "2.7.9.4",
  },
]
`;

exports[`workers/repository/init/vulnerability > detectVulnerabilityAlerts() > returns pip alerts 1`] = `
[
  {
    "force": {
      "branchTopic": "{{{datasource}}}-{{{depNameSanitized}}}-vulnerability",
      "commitMessageSuffix": "[SECURITY]",
      "dependencyDashboardApproval": false,
      "groupName": null,
      "minimumReleaseAge": null,
      "prCreation": "immediate",
      "rangeStrategy": "update-lockfile",
      "schedule": [],
      "vulnerabilityFixStrategy": "lowest",
    },
    "isVulnerabilityAlert": true,
    "matchCurrentVersion": "< 2.2.1.0",
    "matchDatasources": [
      "pypi",
    ],
    "matchFileNames": [
      "requirements.txt",
    ],
    "matchPackageNames": [
      "ansible",
    ],
    "prBodyNotes": [
      "### GitHub Vulnerability Alerts",
      "#### [CVE-2017-7481](https://nvd.nist.gov/vuln/detail/CVE-2017-7481)

Ansible before versions 2.3.1.0 and 2.4.0.0 fails to properly mark lookup-plugin results as unsafe. If an attacker could control the results of lookup() calls, they could inject Unicode strings to be parsed by the jinja2 templating system, resulting in code execution. By default, the jinja2 templating language is now marked as 'unsafe' and is not evaluated.",
      "#### [CVE-2015-3908](https://nvd.nist.gov/vuln/detail/CVE-2015-3908)

Ansible before 1.9.2 does not verify that the server hostname matches a domain name in the subject's Common Name (CN) or subjectAltName field of the X.509 certificate, which allows man-in-the-middle attackers to spoof SSL servers via an arbitrary valid certificate.",
      "#### [CVE-2016-8647](https://nvd.nist.gov/vuln/detail/CVE-2016-8647)

An input validation vulnerability was found in Ansible's mysql_user module before 2.2.1.0, which may fail to correctly change a password in certain circumstances. Thus the previous password would still be active when it should have been changed.",
      "#### [CVE-2016-8614](https://nvd.nist.gov/vuln/detail/CVE-2016-8614)

A flaw was found in Ansible before version 2.2.0. The apt_key module does not properly verify key fingerprints, allowing remote adversary to create an OpenPGP key which matches the short key ID and inject this key instead of the correct key.",
      "#### [CVE-2016-8628](https://nvd.nist.gov/vuln/detail/CVE-2016-8628)

Ansible before version 2.2.0 fails to properly sanitize fact variables sent from the Ansible controller. An attacker with the ability to create special variables on the controller could execute arbitrary commands on Ansible clients as the user Ansible runs as.",
      "#### [CVE-2016-9587](https://nvd.nist.gov/vuln/detail/CVE-2016-9587)

Ansible before versions 2.1.4, 2.2.1 is vulnerable to an improper input validation in Ansible's handling of data sent from client systems. An attacker with control over a client system being managed by Ansible and the ability to send facts back to the Ansible server could use this flaw to execute arbitrary code on the Ansible server using the Ansible server privileges.",
    ],
    "vulnerabilityFixVersion": "2.2.1.0",
  },
]
`;
