Skip to content

fix(checks): handle file: and multi: in AVD-DS-0011 - #56

Merged
simar7 merged 1 commit into
aquasecurity:mainfrom
candrews:patch-1
Feb 7, 2024
Merged

simar7 merged 1 commit into
aquasecurity:mainfrom
candrews:patch-1

Conversation

@candrews

@candrews candrews commented Jan 17, 2024

Copy link
Copy Markdown
Contributor

The reverse engineered Dockerfile of an image doesn't exactly match
the original Dockerfile. For example, it doesn't have the original
source files names. Instead, it uses file:<hash> in:
COPY file:8b8864b3e02a33a579dc216fd51b28a6047bc8eeaa03045b258980fe0cf7fcb3 in /__cacert_entrypoint.sh

Such commands should not trigger AVD-DS-0011.

@candrews
candrews requested a review from simar7 as a code owner January 17, 2024 15:50
@candrews
candrews marked this pull request as draft January 17, 2024 15:50
@candrews candrews changed the title fix: testing copy with file: arg fix(checks): Handle ADD file: in in AVD-DS-0011 Jan 17, 2024
@candrews

Copy link
Copy Markdown
Contributor Author

I've never used rego before and I'm having trouble grokking it and I'm very confident that the tests aren't actually running when I run make test so I doubt this works and I can't test it... but hopefully it's at least a good starting point and someone can help me complete it :)

@candrews
candrews marked this pull request as ready for review January 17, 2024 17:07
@candrews candrews changed the title fix(checks): Handle ADD file: in in AVD-DS-0011 fix(checks): handle file: and multi: in AVD-DS-0011 Jan 17, 2024
@simar7

simar7 commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

I've never used rego before and I'm having trouble grokking it and I'm very confident that the tests aren't actually running when I run make test so I doubt this works and I can't test it... but hopefully it's at least a good starting point and someone can help me complete it :)

You are right, the tests are in the process of being brought over to this repo. We'll take a look at your PRs once we merge the tests in to ensure nothing breaks.

@candrews

Copy link
Copy Markdown
Contributor Author

@simar7 can you please help me progress this MR?

I'm very eager to eliminate this false positive.

@simar7

simar7 commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

@nikpivkin could you take a look?

@nikpivkin

Copy link
Copy Markdown
Contributor

Hi @candrews !

Can you make the same recommendations as in this comment on this PR?

The reverse engineered `Dockerfile` of an image doesn't exactly match
the original `Dockerfile`. For example, it doesn't have the original
source files names. Instead, it uses `file:<hash> in`:
`COPY file:8b8864b3e02a33a579dc216fd51b28a6047bc8eeaa03045b258980fe0cf7fcb3 in /__cacert_entrypoint.sh`

Such commands should not trigger AVD-DS-0011.
@candrews

candrews commented Feb 6, 2024

Copy link
Copy Markdown
Contributor Author

Hi @candrews !

Can you make the same recommendations as in this comment on this PR?

Done!

Thank you very much for your help!

@simar7
simar7 merged commit 38c3895 into aquasecurity:main Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants