{"id":19880041,"url":"https://github.com/kochetkov-ma/koproc","last_synced_at":"2025-09-18T19:32:40.771Z","repository":{"id":57745382,"uuid":"315046551","full_name":"kochetkov-ma/koproc","owner":"kochetkov-ma","description":"Run process and execute commands in Kotlin [koproc] [java processbuilder] [kotlin processbuilder]","archived":false,"fork":false,"pushed_at":"2020-11-26T13:42:04.000Z","size":43,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T00:22:53.830Z","etag":null,"topics":["cmd","execute","koproc","kotlin","pid","process","processbuilder"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kochetkov-ma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-22T13:40:45.000Z","updated_at":"2024-05-14T09:31:57.000Z","dependencies_parsed_at":"2022-08-30T17:41:30.659Z","dependency_job_id":null,"html_url":"https://github.com/kochetkov-ma/koproc","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/kochetkov-ma/koproc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fkoproc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fkoproc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fkoproc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fkoproc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kochetkov-ma","download_url":"https://codeload.github.com/kochetkov-ma/koproc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fkoproc/sbom","scorecard":{"id":565450,"data":{"date":"2025-08-11","repo":{"name":"github.com/kochetkov-ma/koproc","commit":"fb80983ace117de1e5eccc1d11a30d8e82b16439"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":0,"reason":"dangerous workflow patterns detected","details":["Warn: script injection with untrusted input ' github.head_ref ': .github/workflows/release.yml:20"],"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/kochetkov-ma/koproc/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/kochetkov-ma/koproc/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/kochetkov-ma/koproc/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/kochetkov-ma/koproc/release.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T14:51:56.187Z","repository_id":57745382,"created_at":"2025-08-20T14:51:56.188Z","updated_at":"2025-08-20T14:51:56.188Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275820538,"owners_count":25534815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmd","execute","koproc","kotlin","pid","process","processbuilder"],"created_at":"2024-11-12T17:10:05.908Z","updated_at":"2025-09-18T19:32:40.467Z","avatar_url":"https://github.com/kochetkov-ma.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"koproc\n=============================\n\n[![jdk11](https://camo.githubusercontent.com/f3886a668d85acf93f6fec0beadcbb40a5446014/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a646b2d31312d7265642e737667)](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)\n[![kotlin](https://img.shields.io/badge/kotlin-1.4.20-green)](https://github.com/JetBrains/kotlin)\n[![gradle](https://camo.githubusercontent.com/f7b6b0146f2ee4c36d3da9fa18d709301d91f811/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f746f6f6c2d677261646c652d626c75652e737667)](https://gradle.org/)\n![GitHub](https://img.shields.io/github/license/kotest/kotest)\n[![maven central](https://img.shields.io/maven-central/v/ru.iopump.koproc/koproc)](http://search.maven.org/#search|ga|1|koproc)\n\nSmall lib to execute process and run commands in `Kotlin` style.\n\nBased on `Java ProcessBuilder API`\n\n## Get Started\n\n### Add dependencies\n\nGradle Groovy Dsl:\n\n```groovy\ndependencies {\n    /** KoProc */\n    implementation \"ru.iopump.koproc:koproc:1.1.1\"\n}\n```\n\nGradle Kotlin Dsl:\n\n```kotlin\ndependencies {\n    /** KoProc */\n    implementation(\"ru.iopump.koproc:koproc:1.1.1\")\n}\n```\n\n### Run process and get the result\n\nStart process with long duration, do something with Process Java API via `KoprocCall` and get the result as `KoprocResult`\n\n```kotlin\nimport ru.iopump.koproc.startProcess\n\nfun run() {\n    val koprocCall: KoprocCall = \"java -jar koproc-sample.jar\".startProcess()\n\n    // Get available 'out' and 'err' and close\n    koprocCall.use { koprocCall: KoprocCall -\u003e\n        val out: String = koprocCall.readAvailableOut\n        val err: String = koprocCall.readAvailableErrOut\n    }\n\n    // Get immutable object with results\n    val koprocResult: KoprocResult = koprocCall.result\n    // Throw exception on exit code != 0 or any Throwable during execution.\n    koprocResult.throwOnAnyFailure().also { koprocResult -\u003e\n        println(\"There are no exception thrown. The result is ${koprocResult.out}\")\n    }\n}\n\n```\n\n### Run command and get the result\n\nExecute short command and wait the result as `KoprocResult`\n\n```kotlin\nimport ru.iopump.koproc.startCommand\n\nfun run() {\n    // Adjust KoprocConfig in startCommand function argument\n    val koprocResult: KoprocResult = \"java -jar koproc-sample.jar\".startCommand { timeoutSec = 5 }\n\n    if (koprocResult.hasSuccessCode) println(\"Exit code == 0\")\n    if (koprocResult.hasNotError) println(\"No Throwable during execution\")\n    if (koprocResult.isSuccess) println(\"Exit code == 0 and no Throwable during execution\")\n}\n\n```\n\n### Adjust default timeouts\n\n```kotlin\ninit {\n    ru.iopump.koproc.koprocDefaultStartCommandTimeoutSec = 5L\n    ru.iopump.koproc.koprocDefaultStartProcessTimeoutSec = 3600L\n}\n```\n\n## Examples\nThere is a [sample project link](https://github.com/kochetkov-ma/pump-samples/tree/master/koproc-sample) using koproc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochetkov-ma%2Fkoproc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkochetkov-ma%2Fkoproc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochetkov-ma%2Fkoproc/lists"}