Unverified Commit 7779a868 authored by Sefa Eyeoglu's avatar Sefa Eyeoglu Committed by GitHub
Browse files

Fix Codeql findings in update scripts (#342541)

parents aa3e6024 1c4d950b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ const fixupYarnLock = async (lockContents, verbose) => {
			}
			const [ url, hash ] = pkg.resolved.split("#", 2)

			if (hash || url.startsWith("https://codeload.github.com")) {
			if (hash || url.startsWith("https://codeload.github.com/")) {
				if (verbose) console.log(`Removing integrity for git dependency ${dep}`)
				delete pkg.integrity
			}
+1 −1
Original line number Diff line number Diff line
@@ -396,7 +396,7 @@ def repo_from_dep(dep: dict) -> Optional[Repo]:
        if search_object:
            return GitHubRepo(search_object.group(1), search_object.group(2), rev)

        if re.match(r"https://.+.googlesource.com", url):
        if re.match(r"https://.+\.googlesource.com", url):
            return GitilesRepo(url, rev)

        return GitRepo(url, rev)
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ async function fixPkgAddMissingSha1(pkg) {

  const [url, sha1] = pkg.resolved.split("#", 2);

  if (sha1 || url.startsWith("https://codeload.github.com")) {
  if (sha1 || url.startsWith("https://codeload.github.com/")) {
    return pkg;
  }

+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ def process_repo(path: str, official: bool):
        'description': desc,
        'homepage': origurl,
    }
    if domain.endswith('github.com'):
    if domain == 'github.com':
        owner, repo = query.split('/')
        ret['github'] = {
            'owner': owner,