#fixed code
                                private void verifyArchivedNotContainingItself(WorkflowRun run) throws IOException {
        assertTrue("Build should have artifacts", run.getHasArtifacts());
        Run<WorkflowJob, WorkflowRun>.Artifact artifact = run.getArtifacts().get(0);
        VirtualFile file = run.getArtifactManager().root().child(artifact.relativePath);
        try (ZipInputStream zip = new ZipInputStream(file.open())) {
            for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) {
                assertNotEquals("The zip output file shouldn't contain itself", entry.getName(), artifact.getFileName());
            }
        }
    }
#vulnerable code 
                                private void verifyArchivedNotContainingItself(WorkflowRun run) throws IOException {
        assertTrue("Build should have artifacts", run.getHasArtifacts());
        Run<WorkflowJob, WorkflowRun>.Artifact artifact = run.getArtifacts().get(0);
        VirtualFile file = run.getArtifactManager().root().child(artifact.relativePath);
        ZipInputStream zip = new ZipInputStream(file.open());
        for(ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) {
            assertNotEquals("The zip output file shouldn't contain itself", entry.getName(), artifact.getFileName());
        }
    } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK