{"id":31978629,"url":"https://github.com/nyaosorg/go-windows-junction","last_synced_at":"2025-10-14T22:24:49.781Z","repository":{"id":57519671,"uuid":"236753729","full_name":"nyaosorg/go-windows-junction","owner":"nyaosorg","description":"A Go package to create junction points on Windows","archived":false,"fork":false,"pushed_at":"2025-05-31T11:43:02.000Z","size":17,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-31T23:43:14.805Z","etag":null,"topics":["go","golang","junction","windows"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/nyaosorg/go-windows-junction","language":"Go","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/nyaosorg.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-28T14:26:17.000Z","updated_at":"2025-05-31T11:45:36.000Z","dependencies_parsed_at":"2025-05-31T12:46:45.580Z","dependency_job_id":"142ae9f5-5618-4b8b-b7c4-504e3a133359","html_url":"https://github.com/nyaosorg/go-windows-junction","commit_stats":null,"previous_names":["zetamatta/go-windows-junction"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nyaosorg/go-windows-junction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyaosorg%2Fgo-windows-junction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyaosorg%2Fgo-windows-junction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyaosorg%2Fgo-windows-junction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyaosorg%2Fgo-windows-junction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nyaosorg","download_url":"https://codeload.github.com/nyaosorg/go-windows-junction/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyaosorg%2Fgo-windows-junction/sbom","scorecard":{"id":699780,"data":{"date":"2025-08-11","repo":{"name":"github.com/nyaosorg/go-windows-junction","commit":"edc57c64b718bb78d1060a83f74ab40f58089b13"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"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":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","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":"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":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/go.yml:13","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":"Code-Review","score":0,"reason":"Found 0/20 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":"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: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/nyaosorg/go-windows-junction/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/nyaosorg/go-windows-junction/go.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned 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":"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":"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":"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:0","Info: FSF or OSI recognized license: MIT License: 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 'master'"],"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":"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"}}]},"last_synced_at":"2025-08-22T04:55:47.500Z","repository_id":57519671,"created_at":"2025-08-22T04:55:47.500Z","updated_at":"2025-08-22T04:55:47.500Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021780,"owners_count":26087055,"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-14T02:00:06.444Z","response_time":60,"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":["go","golang","junction","windows"],"created_at":"2025-10-14T22:24:47.497Z","updated_at":"2025-10-14T22:24:49.776Z","avatar_url":"https://github.com/nyaosorg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-windows-junction\r\n===================\r\n\r\n[![Go Reference](https://pkg.go.dev/badge/github.com/nyaosorg/go-windows-junction.svg)](https://pkg.go.dev/github.com/nyaosorg/go-windows-junction)\r\n[![Go Test](https://github.com/nyaosorg/go-windows-junction/actions/workflows/go.yml/badge.svg)](https://github.com/nyaosorg/go-windows-junction/actions/workflows/go.yml)\r\n\r\nA Go package to create [junction points](https://docs.microsoft.com/en-us/windows/win32/fileio/hard-links-and-junctions) on Windows.\r\n\r\n- On **Windows**, it creates a junction point using native system calls.\r\n- On **non-Windows** platforms (Linux, macOS), it falls back to `os.Symlink`.\r\n\r\nJunctions are similar to symbolic links but have certain limitations:\r\n- They can only point to directories.\r\n- They do not require elevated privileges (unlike symlinks on some versions of Windows).\r\n- The link target can be read using `os.Readlink`.\r\n\r\nThis package is useful when writing cross-platform code that creates directory links, and you want consistent behavior on Windows without requiring admin rights.\r\n\r\n## Installation\r\n\r\n```sh\r\ngo get github.com/nyaosorg/go-windows-junction\r\n````\r\n\r\n## Usage Example\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n    \"os\"\r\n    \"errors\"\r\n\r\n    \"github.com/nyaosorg/go-windows-junction\"\r\n)\r\n\r\nfunc main1() error {\r\n    if len(os.Args) \u003c 3 {\r\n        return errors.New(\"go run example.go TARGET MOUNTPT\")\r\n    }\r\n    if err := junction.Create(os.Args[1], os.Args[2]); err != nil {\r\n        return err\r\n    }\r\n    result, err := os.Readlink(os.Args[2])\r\n    if err != nil {\r\n        return err\r\n    }\r\n    println(os.Args[2], \" is linked to \", result)\r\n    return nil\r\n}\r\n\r\nfunc main() {\r\n    if err := main1(); err != nil {\r\n        println(err.Error())\r\n        os.Exit(1)\r\n    }\r\n}\r\n```\r\n\r\n### Output Example\r\n\r\n```\r\n$ go run example.go ../nyagos nya\r\nnya  is linked to  C:\\Users\\hymko\\go\\src\\github.com\\nyaosorg\\nyagos\r\n```\r\n\r\n## Author\r\n\r\n[hymkor (HAYAMA Kaoru)](https://github.com/hymkor)\r\n\r\n## License\r\n\r\nMIT License\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyaosorg%2Fgo-windows-junction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyaosorg%2Fgo-windows-junction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyaosorg%2Fgo-windows-junction/lists"}