Giter Club home page Giter Club logo

Comments (3)

gfs avatar gfs commented on June 14, 2024 1

Looks like this is an old experiment. Should be fine to remove. See #587

from devskim.

maj113 avatar maj113 commented on June 14, 2024

BTW using this as the URL:

https://web.archive.org/web/20180731220224/https://technet.microsoft.com/en-us/security/advisories

does work albeit with issues:

2023-09-12 18:56:26,281 Error parsing advisory list2: list index out of range
2023-09-12 18:56:32,551 Error parsing advisory list2: list index out of range
2023-09-12 18:56:36,606 Error parsing advisory list2: list index out of range
2023-09-12 18:56:53,803 Error parsing advisory list2: list index out of range
2023-09-12 18:57:03,294 Error parsing advisory list2: list index out of range
2023-09-12 18:58:43,954 Error parsing advisory list2: list index out of range
[
  {
    "id": "DS300006",
    "name": "Vulnerable NuGet Library",
    "tags": [
      "Vulerable-Dependency.Library.NuGet"
    ],
    "severity": "moderate",
    "description": "Vulnerabilities in .NET Core, ASP.NET Core Could Allow Elevation of Privilege",
    "replacement": "Upgrade this package to a later, unaffected version.",
    "rule_info": "https://web.archive.org/web/20180731220224/https://technet.microsoft.com/library/security/4021279",
    "applies_to": [
      "packages.config"
    ],
    ...

I called the warning list2 since both try blocks have the same exception message:

...
	div = soup.find_all('div', id='sec_advisory')[0]
	for table in div.find_all('table'):
		try:
			for row in table.find_all('tr'):
				try:
					a = row.find_all('td')[2].a
					if not a:
						continue
					href = a['href']
					result = process_advisory(href)
					if result:
						rules.append(result)

				except Exception as msg:
					logger.warn('Error parsing advisory list2: {0}'.format(msg))
		except Exception as m:
			logger.warn('Error parsing advisory list1: {0}'.format(m))

	logger.debug('Processing complete, outputting result.')
	print(json.dumps(rules, indent=2))
...

from devskim.

gfs avatar gfs commented on June 14, 2024

Thanks again for the report.

I am not sure that we currently use this for anything (that it's broken is a good indication we do not). I'll need to dig a bit into the context here with the team to decide if it's worth fixing (thanks for your initial investigation into what that might look like) or just removing.

from devskim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.