{"id":19484895,"url":"https://github.com/omiyagames/omiya-games-web-security","last_synced_at":"2025-04-25T16:33:48.656Z","repository":{"id":92285999,"uuid":"265624509","full_name":"OmiyaGames/omiya-games-web-security","owner":"OmiyaGames","description":"Collection of tools for WebGL security","archived":false,"fork":false,"pushed_at":"2024-09-03T20:59:58.000Z","size":1119,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-10T17:46:07.540Z","etag":null,"topics":["inspector","omiya-games","openupm","security","security-tools","unity","unity2d","unity3d","webgl"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/OmiyaGames.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"omiyagames","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-05-20T16:30:34.000Z","updated_at":"2023-06-20T05:43:47.000Z","dependencies_parsed_at":"2023-06-08T06:45:46.467Z","dependency_job_id":null,"html_url":"https://github.com/OmiyaGames/omiya-games-web-security","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":"OmiyaGames/template-unity-package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmiyaGames%2Fomiya-games-web-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmiyaGames%2Fomiya-games-web-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmiyaGames%2Fomiya-games-web-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmiyaGames%2Fomiya-games-web-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OmiyaGames","download_url":"https://codeload.github.com/OmiyaGames/omiya-games-web-security/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224009868,"owners_count":17240636,"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","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":["inspector","omiya-games","openupm","security","security-tools","unity","unity2d","unity3d","webgl"],"created_at":"2024-11-10T20:24:24.674Z","updated_at":"2024-11-10T20:24:26.216Z","avatar_url":"https://github.com/OmiyaGames.png","language":"C#","funding_links":["https://ko-fi.com/omiyagames","https://ko-fi.com/I3I51KS8F"],"categories":[],"sub_categories":[],"readme":"# [Omiya Games](https://www.omiyagames.com/) - Web Security\n\n[![openupm](https://img.shields.io/npm/v/com.omiyagames.web.security?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.omiyagames.web.security/) [![Documentation](https://github.com/OmiyaGames/omiya-games-web-security/workflows/Host%20DocFX%20Documentation/badge.svg)](https://omiyagames.github.io/omiya-games-web-security/) [![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/I3I51KS8F)\n\n**Web Security** is a Github package [Omiya Games](https://www.omiyagames.com/) uses to peform various security features for WebGL builds.  This includes:\n\n### Web Location Checker\n\nA script that verifies the build is running on the correct host.  Attach to a `GameObject` like any other `MonoBehavior`, then call the coroutine, `CheckDomainList()`, from another script.  For example, one can create a script with the method below, then attach it to the same `GameObject` the `WebLocationChecker` is on:\n\n```csharp\nIEnumerator Start()\n{\n    // Verify the domain\n    WebLocationChecker checker = GetComponent\u003cWebLocationChecker\u003e();\n    yield return StartCoroutine(checker.CheckDomainList());\n\n    // Check if the domain was verified\n    if(checker.CurrentState == WebLocationChecker.State.DomainMatched)\n    {\n        // Change scene to the main menu\n        SceneManager.LoadScene(\"Main menu\");\n    }\n}\n```\n\nThe script contains the following inspector fields:\n\n![Inspector](https://omiyagames.github.io/omiya-games-web-security/resources/web-location-checker.png)\n\n| Field                     \t|           Required?          \t| Description \t|\n|---------------------------\t|:----------------------------:\t|-------------\t|\n| Remote Domain List Url    \t|               No             \t| The path to download a [`DomainList`](https://omiyagames.github.io/omiya-games-cryptography/manual/domain-list.html), relative to the root of the WebGL build (typically where `index.html` is in). The strings in the `DomainList` will be used to match the domain the build is running on, *in addition to* strings listed in `Domain Must Contain`. Leave empty if no file should be downloaded.\t|\n| Domain Decrypter          \t|              No              \t| The [`StringCryptographer`](https://omiyagames.github.io/omiya-games-cryptography/manual/string-cryptographer.html) to use to decrypt the content of the downloaded [`DomainList`](https://omiyagames.github.io/omiya-games-cryptography/manual/domain-list.html). Entirely optional, especially if the downloaded file is not expected to be encrypted.\t|\n| GameObjects to Deactivate \t|               No             \t| A list of `GameObjects` to deactivate while the script verifies the domain the build is running on.\t|\n| Domain Must Contain       \t|              Yes             \t| A list of strings to verify whether the domain the game is running on matches. This script supports `?` and `*` wildcards (former any single character, while the latter matches a series of character).\t|\n| Force Redirect            \t|              No              \t| If checked, *and* the domain did not match, prompts the script to redirect to a different website. If this build is embedded in an `iframe` with redirect permission restrictions (which most browsers enable by default), the redirect may fail with an `AccessDenied` error.\t|\n| Redirect URL              \t| If `Force Redirect` is checked \t| The URL to redirect to if the doamin did not match. This URL should include `https://`\t|\n\n## Install\n\nThere are two common methods for installing this package.\n\n### Through [Unity Package Manager](https://docs.unity3d.com/Manual/upm-ui-giturl.html)\n\nUnity's own Package Manager supports [importing packages through a URL to a Git repo](https://docs.unity3d.com/Manual/upm-ui-giturl.html):\n\n1. First, on this repository page, click the \"Clone or download\" button, and copy over this repository's HTTPS URL.  \n2. Then click on the + button on the upper-left-hand corner of the Package Manager, select \"Add package from git URL...\" on the context menu, then paste this repo's URL!\n\nWhile easy and straightforward, this method has a few major downside: it does not support dependency resolution and package upgrading when a new version is released.  To add support for that, the following method is recommended:\n\n### Through [OpenUPM](https://openupm.com/)\n\nInstalling via [OpenUPM's command line tool](https://openupm.com/) is recommended because it supports dependency resolution, upgrading, and downgrading this package.\n\nIf you haven't already [installed OpenUPM](https://openupm.com/docs/getting-started.html#installing-openupm-cli), you can do so through Node.js's `npm` (obviously have Node.js installed in your system first):\n```\nnpm install -g openupm-cli\n```\nThen, to install this package, just run the following command at the root of your Unity project:\n```\nopenupm add com.omiyagames.web.security\n```\n\n## Resources\n\n- [Documentation](https://omiyagames.github.io/omiya-games-web-security/)\n- [Change Log](https://omiyagames.github.io/omiya-games-web-security/manual/changelog.md)\n\n## LICENSE\n\nOverall package is licensed under [MIT](https://github.com/OmiyaGames/omiya-games-web-security/blob/master/LICENSE.md), unless otherwise noted in the [3rd party licenses](https://github.com/OmiyaGames/omiya-games-web-security/blob/master/THIRD%20PARTY%20NOTICES.md) file and/or source code.\n\nCopyright (c) 2019-2021 Omiya Games\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomiyagames%2Fomiya-games-web-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomiyagames%2Fomiya-games-web-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomiyagames%2Fomiya-games-web-security/lists"}