semgrep-rules icon indicating copy to clipboard operation
semgrep-rules copied to clipboard

generic.dockerfile.correctness.copy-from-own-alias.copy-from-own-alias matches even after switching images

Open malexmave opened this issue 3 years ago • 3 comments

Describe the bug The rule generic.dockerfile.correctness.copy-from-own-alias.copy-from-own-alias matches the following code:

FROM gradle:jdk11 as cache
RUN stuff

FROM other:1.0 as builder
COPY --from=cache /cache /home/gradle/.gradle

FROM image:3 as deploy
RUN stuff

Reproduce in playground

Expected behavior It should not match, because the described error (copying by alias from the currently active image) is not present. Again, I tried to fix it but could not make it work on short notice.

Priority How important is this to you?

  • [ ] P0: blocking me from making progress
  • [ ] P1: this will block me in the near future
  • [x] P2: annoying but not blocking me

malexmave avatar Nov 09 '21 14:11 malexmave

Blocked on returntocorp/semgrep#4327

minusworld avatar Nov 23 '21 22:11 minusworld

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 29 '22 01:03 stale[bot]

Bump to keep this open, as it is currently blocked on a different issue, but not necessarily stale.

malexmave avatar Mar 29 '22 09:03 malexmave