I hereby claim:
- I am bobbymcwho on github.
- I am bobbymcwho (https://keybase.io/bobbymcwho) on keybase.
- I have a public key ASBLy5Vbk00319-ZDn5u38bHLlTnhYEBFKH-NQzq5Zd4Xwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I came across this error when validating XML files against an XSD in Nokogiri.
When validating a complexType XML element, if a node fails validation due to a Occurence restriction, and it is the last node in the complex element, the validation error will not raise, and will pass as a valid document. If there is another node in the sequence that is allowed, then at that point the document will fail validation. However, the error that is thrown is misleading, because it will say that the second element is the one that is out of place, rather than the one that is actually out of place.
The easiest way to reproduce this is with xmllint:
$xmllint --noout --schema example_xsd.xsd incorrectly_passing.xml
incorrectly_passing.xml validates
# See: https://github.com/dependabot/dependabot-script/blob/master/update-script.rb | |
# Other update script logic | |
vulnerabilities = VulnerabilityFetcher.new(dependency_names, package_manager).fetch_advisories | |
# Note you may not just want top level depending on your use case | |
dependencies.select(&:top_level?).each do |dep| | |
security_vulnerabilities = [] | |
if vulnerabilities.any? | |
security_vulnerabilities = vulnerabilities[dep.name.to_sym].map do |vuln| |