示例#1
0
 def find(self, derivation, vulns):
     """Compiles all matching rules into a `Filtered` object."""
     f = Filtered(derivation, vulns)
     for cand in self.candidates(derivation.pname, derivation.version):
         if cand.covers(derivation, vulns):
             f.add(cand)
     return f
示例#2
0
 def find(self, derivation):
     """Compiles all matching rules into a `Filtered` object."""
     f = Filtered(derivation)
     for cand in self.candidates(derivation.pname, derivation.version):
         if cand.covers(derivation):
             f.add(cand)
     return f
示例#3
0
def test_add_unspecific_rule(deriv):
    f = Filtered(deriv)
    f.add(WhitelistRule(pname='test', version='1.2'))
    assert not f.report
示例#4
0
def test_add_unspecific_rule(deriv):
    f = Filtered(deriv)
    f.add(WhitelistRule(pname='test', version='1.2'))
    assert not f.report