tests: xfail binja forwarded exports

This commit is contained in:
Willi Ballenthin
2023-07-17 17:56:33 +02:00
parent d1f5a6e76b
commit 221a5a9f03
3 changed files with 12 additions and 1 deletions

2
.gitignore vendored
View File

@@ -124,3 +124,5 @@ Pipfile
Pipfile.lock
/cache/
.github/binja/binaryninja
.github/binja/download_headless.py
.github/binja/BinaryNinja-headless.zip

View File

@@ -16,7 +16,7 @@ import capa.features.insn
import capa.features.extractors.common
import capa.features.extractors.helpers
import capa.features.extractors.strings
from capa.features.file import Export, FunctionName, Import, Section
from capa.features.file import Export, Import, Section, FunctionName
from capa.features.common import Feature, Characteristic
from capa.features.address import Address, FileOffsetAddress, AbsoluteVirtualAddress

View File

@@ -12,6 +12,8 @@ import pytest
import fixtures
import capa.main
import capa.features.file
import capa.features.common
logger = logging.getLogger(__file__)
@@ -40,6 +42,13 @@ except ImportError:
def test_binja_features(sample, scope, feature, expected):
if feature == capa.features.common.Characteristic("stack string"):
pytest.xfail("skip failing Binja stack string detection temporarily, see #1473")
if isinstance(feature, capa.features.file.Export) and "." in str(feature.value):
pytest.xfail("skip Binja unsupported forwarded export feature, see #1624")
if feature == capa.features.common.Characteristic("forwarded export"):
pytest.xfail("skip Binja unsupported forwarded export feature, see #1624")
fixtures.do_test_feature_presence(fixtures.get_binja_extractor, sample, scope, feature, expected)