{"id":15297574,"url":"https://github.com/artipie/asto","last_synced_at":"2025-10-07T10:31:05.395Z","repository":{"id":37087427,"uuid":"229721454","full_name":"artipie/asto","owner":"artipie","description":"Abstract Storage for All Artipie Slices","archived":true,"fork":false,"pushed_at":"2023-12-22T13:31:59.000Z","size":1358,"stargazers_count":21,"open_issues_count":18,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-03T15:51:35.346Z","etag":null,"topics":["java","java-8","storage"],"latest_commit_sha":null,"homepage":"https://www.artipie.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artipie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.header","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-12-23T09:38:05.000Z","updated_at":"2024-01-10T06:06:07.000Z","dependencies_parsed_at":"2023-12-22T15:06:53.700Z","dependency_job_id":null,"html_url":"https://github.com/artipie/asto","commit_stats":null,"previous_names":["yegor256/asto"],"tags_count":101,"template":false,"template_full_name":null,"purl":"pkg:github/artipie/asto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Fasto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Fasto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Fasto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Fasto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artipie","download_url":"https://codeload.github.com/artipie/asto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Fasto/sbom","scorecard":{"id":209576,"data":{"date":"2025-08-11","repo":{"name":"github.com/artipie/asto","commit":"72cf14c443246a2df06d11693ab0f328e7fd155c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Code-Review","score":9,"reason":"Found 27/28 approved changesets -- score normalized to 9","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/deploy-snapshot.yml:1","Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Warn: no topLevel permission defined: .github/workflows/pdd.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/update-copyright-years.yml:1","Warn: no topLevel permission defined: .github/workflows/xcop.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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-snapshot.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/deploy-snapshot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-snapshot.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/deploy-snapshot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-snapshot.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/deploy-snapshot.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy-snapshot.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/deploy-snapshot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pdd.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/pdd.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pdd.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/pdd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-copyright-years.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/update-copyright-years.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update-copyright-years.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/update-copyright-years.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/xcop.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/xcop.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/xcop.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/artipie/asto/xcop.yml/master?enable=pin","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-269g-pwp5-87pp","Warn: Project is vulnerable to: GHSA-4p6w-m9wc-c9c9","Warn: Project is vulnerable to: GHSA-5v34-g2px-j4fw","Warn: Project is vulnerable to: GHSA-q5r4-cfpx-h6fh","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-rc2q-x9mf-w3vf","Warn: Project is vulnerable to: GHSA-3mc7-4q67-w48m","Warn: Project is vulnerable to: GHSA-98wm-3w3q-mw94","Warn: Project is vulnerable to: GHSA-9w3m-gqgf-c4p9","Warn: Project is vulnerable to: GHSA-c4r9-r8fh-9vj2","Warn: Project is vulnerable to: GHSA-hhhw-99gj-p3c3","Warn: Project is vulnerable to: GHSA-mjmj-j48q-9wg2","Warn: Project is vulnerable to: GHSA-rvwf-54qp-4r6v","Warn: Project is vulnerable to: GHSA-w37g-rhq8-7m4j"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T00:30:28.656Z","repository_id":37087427,"created_at":"2025-08-17T00:30:28.656Z","updated_at":"2025-08-17T00:30:28.656Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278761348,"owners_count":26041370,"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-10-07T02:00:06.786Z","response_time":59,"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":["java","java-8","storage"],"created_at":"2024-09-30T19:18:20.533Z","updated_at":"2025-10-07T10:31:04.973Z","avatar_url":"https://github.com/artipie.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"http://artipie.com\"\u003e\u003cimg src=\"https://www.artipie.com/logo.svg\" width=\"64px\" height=\"64px\"/\u003e\u003c/a\u003e\n\n[![Join our Telegram group](https://img.shields.io/badge/Join%20us-Telegram-blue?\u0026logo=telegram\u0026?link=http://right\u0026link=http://t.me/artipie)](http://t.me/artipie)\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)\n\n[![Javadoc](http://www.javadoc.io/badge/com.artipie/asto-core.svg)](http://www.javadoc.io/doc/com.artipie/asto-core)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/artipie/asto/blob/master/LICENSE.txt)\n[![codecov](https://codecov.io/gh/artipie/asto/branch/master/graph/badge.svg)](https://codecov.io/gh/artipie/asto)\n[![Hits-of-Code](https://hitsofcode.com/github/artipie/asto)](https://hitsofcode.com/view/github/artipie/asto)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.artipie/asto-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.artipie/asto-core)\n[![PDD status](http://www.0pdd.com/svg?name=artipie/asto)](http://www.0pdd.com/p?name=artipie/asto)\n\nAsto stands for Abstract Storage, an abstraction over physical data storage system.\nThe main entity of the library is an interface `com.artipie.asto.Storage`, a contract\nwhich requires to implement the following functionalities:\n\n* put/get/delete operations\n* transaction support\n* list files in a directory\n* check if a file/directory exists\n* provide file metadata (size, checksums, type, etc.)\n\nDictionary used for ASTO:\n - `Storage` - key-value based storage\n - `Key` - storage keys, could be converted to strings\n - `Content` - storage data, reactive publisher with optional size attribute\n - `SubStorage` - isolated storage based on origin storage\n\n\nThe list of back-ends supported:\n - FileStorage - file-system based storage, uses paths as keys, stores content in files\n - S3Storage - uses S3 compatible HTTP web-server as storage, uses keys as names and blobs for content\n - EtcdStorage - uses ETCD cluster as storage back-end\n - InMemoryStorage - storage uses `HashMap` to store data\n - RedisStorage - storage based on [Redisson](https://github.com/redisson/redisson)\n\n\nThis is the dependency you need:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.artipie\u003c/groupId\u003e\n  \u003cartifactId\u003easto-core\u003c/artifactId\u003e\n  \u003cversion\u003e[...]\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThe following dependency allows using RedisStorage:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.artipie\u003c/groupId\u003e\n  \u003cartifactId\u003easto-redis\u003c/artifactId\u003e\n  \u003cversion\u003e[...]\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nRead the [Javadoc](http://www.javadoc.io/doc/com.artipie/asto-core) for more technical details. \nIf you have any question or suggestions, do not hesitate to [create an issue](https://github.com/artipie/asto/issues/new) \nor contact us in [Telegram](https://t.me/artipie).  \nArtipie [roadmap](https://github.com/orgs/artipie/projects/3).\n\n# Usage\n\nThe main entities here are:\n - `Storage` interface provides API for key-value storage\n - `Key` represents storage key\n - `Content` represents storage binary value\n\n[Storage](https://www.javadoc.io/doc/com.artipie/asto/latest/com/artipie/asto/Storage.html),\n[Key](https://www.javadoc.io/doc/com.artipie/asto/latest/com/artipie/asto/Key.html) and other entities are\ndocumented in [javadoc](https://www.javadoc.io/doc/com.artipie/asto/latest/index.html).\n\nHere is en example of how to create `FileStorage`, save and then read some data:\n```java\nfinal Storage asto = new FileStorage(Path.of(\"/usr/local/example\"));\nfinal Key key = new Key.From(\"hello.txt\");\nasto.save(\n    key,\n    new Content.From(\"Hello world!\".getBytes(StandardCharsets.UTF_8))\n).thenCompose(\n    ignored -\u003e asto.value(key)\n).thenCompose(\n    val -\u003e new PublisherAs(val).asciiString()\n).thenAccept(\n    System.out::println\n).join();\n```\nIn the example we created local text file `/usr/local/example/hello.txt` containing string \"Hello world!\",\nthen read and print it into console. Used classes:\n- `Key.From` is implementation of the `Key` interface, keys are strings, separated by `/`\n- `Content.From` implements `Content` interface, allows to create `Content` instances from \n  byte arrays or [publisher](https://www.reactive-streams.org/reactive-streams-1.0.4-javadoc/org/reactivestreams/Publisher.html) of ByteBuffer's\n- `PublisherAs` class allows to fully read `Content` into memory as byte arrays\n\nNote, that `Storage` is asynchronous and always returns `CompletableFutures` as a result, use \nfuture chains (`thenAccept()`, `thenCompose()` etc.) and call blocking methods `get()` or `join()` \nwhen necessary.\n\nOther storage implementations (`S3Storage`, `InMemoryStorage`, `RedisStorage`) can be used in the same way, only\nconstructors differ, here is an example of how to create `S3Storage` instance:\n\n```java\nfinal Storage asto = new S3Storage(\n    S3AsyncClient.builder().credentialsProvider(\n        StaticCredentialsProvider.create(\n            AwsBasicCredentials.create(\"accessKeyId\", \"secretAccessKey\")\n        )\n    ).build(),\n    \"bucketName\"\n);\n```\n\nTo get more details about `S3AsyncClient` builder, check \n[Java S3 client docs](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/S3AsyncClient.html).\n\n## How to contribute\n\nPlease read [contributing rules](https://github.com/artipie/artipie/blob/master/CONTRIBUTING.md).\n\nFork repository, make changes, send us a pull request. We will review\nyour changes and apply them to the `master` branch shortly, provided\nthey don't violate our quality standards. To avoid frustration, before\nsending us your pull request please run full Maven build:\n\n```\n$ mvn clean install -Pqulice\n```\n\nTo avoid build errors use Maven 3.2+.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartipie%2Fasto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartipie%2Fasto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartipie%2Fasto/lists"}