cisagov / ansible-role-megazord-composition

Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

cs2modrewrite modifications #19

Closed D3cl4n closed 2 years ago

D3cl4n commented 2 years ago

💡 Summary

cs2modrewrite does not specify encoding when performing file IO on the malleable c2 profile. This causes errors with certain linux distributions, because older versions of these distributions use alternative encoding than utf-8. To fix this issue, we use ansible to modify the sourcecode of cs2modrewrite. We standardize the encoding for file IO to be utf-8.

Motivation and context

This work is necessary for the program because we want to make sure our code is working across as many platforms as possible. We also want to ensure we pass all the molecule test cases.

Implementation notes

The modification is done via ansible role, regex pattern to find the lines to be changed.

bhambleton commented 2 years ago

Specifying the file encoding is no longer being done with an ansible task because it is no longer needed