#fixed code
                                private void verifyArchivedHello(WorkflowRun run, String basePath) throws IOException {
        assertTrue("Build should have artifacts", run.getHasArtifacts());
        Run<WorkflowJob, WorkflowRun>.Artifact artifact = run.getArtifacts().get(0);
        assertEquals("hello.zip", artifact.getFileName());
        VirtualFile file = run.getArtifactManager().root().child(artifact.relativePath);
        try (ZipInputStream zip = new ZipInputStream(file.open())) {
            ZipEntry entry = zip.getNextEntry();
            while (entry.isDirectory()) {
                entry = zip.getNextEntry();
            }
            assertNotNull(entry);
            assertEquals(basePath + "hello.txt", entry.getName());
            try (Scanner scanner = new Scanner(zip)) {
                assertTrue(scanner.hasNextLine());
                assertEquals("Hello World!", scanner.nextLine());
                assertNull("There should be no more entries", zip.getNextEntry());
            }
        }
    }
#vulnerable code 
                                private void verifyArchivedHello(WorkflowRun run, String basePath) throws IOException {
        assertTrue("Build should have artifacts", run.getHasArtifacts());
        Run<WorkflowJob, WorkflowRun>.Artifact artifact = run.getArtifacts().get(0);
        assertEquals("hello.zip", artifact.getFileName());
        VirtualFile file = run.getArtifactManager().root().child(artifact.relativePath);
        ZipInputStream zip = new ZipInputStream(file.open());
        ZipEntry entry = zip.getNextEntry();
        while (entry.isDirectory()) {
            entry = zip.getNextEntry();
        }
        assertNotNull(entry);
        assertEquals(basePath + "hello.txt", entry.getName());
        try(Scanner scanner = new Scanner(zip)){
	        assertTrue(scanner.hasNextLine());
	        assertEquals("Hello World!", scanner.nextLine());
	        assertNull("There should be no more entries", zip.getNextEntry());
	        zip.close();
        }
	
    } 
                            #location 10 
                            #vulnerability type RESOURCE_LEAK