Skip to content

Commit c446efd

Browse files
Merge pull request #12 from AikidoSec/parser_utf_8_bom_fix
Change encoding to utf-8-sig
2 parents c875219 + 042c23e commit c446efd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

checkov/dockerfile/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
def parse(filename: str | Path) -> tuple[dict[str, list[_Instruction]], list[str]]:
18-
with open(filename) as dockerfile:
18+
with open(filename, "r", encoding="utf-8-sig") as dockerfile:
1919
dfp = DockerfileParser(fileobj=dockerfile)
2020
return dfp_group_by_instructions(dfp)
2121

0 commit comments

Comments
 (0)