-
Notifications
You must be signed in to change notification settings - Fork 0
Add xatlas native library and improve tool robustness #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f70c2e3
8aac825
ab237f5
9d2f97f
254e131
7e05c11
ed32493
a6667c5
0e50071
e157498
d183260
8892f9a
8fc1373
3bfda6e
d333790
b8e7c8b
e6ef72b
95eef91
dcfeddd
5ade5c8
b80baff
b4e9f78
c021b9e
11474a5
0b1d245
49e1c87
7dbedc9
79decd4
390f7cb
494b049
9d11d56
d57c3c6
dab2c98
e24de00
504f84d
fbd797d
13d50b6
fe5c210
135f7c4
0e7dd50
8b5b283
ddbadcc
c1eeb19
42feec8
454d491
4a6ba2e
362bd23
a2e2be8
3d898b1
40f0036
d0a6ba9
543795e
24bb542
e0d85e4
e1218ad
3e82c9d
78a6e7a
2d84f15
a3262de
1424e67
8bd14b2
d1c41bf
cdaeae1
d964ed2
902566b
39565fc
62ac795
ed73bcc
043b0d2
6f98c59
388dcbd
5eb9e3a
2eb1a5e
bf9013c
b579d2f
9625a69
84e37e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,12 +84,15 @@ jobs: | |||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Check package.json is valid JSON | ||||||||||||||||||||||||||||||||||
| run: python3 -c "import json; json.load(open('package.json'))" | ||||||||||||||||||||||||||||||||||
| # `jq empty` succeeds on a stream of several root values ("{...}{...}"), | ||||||||||||||||||||||||||||||||||
| # which every JSON consumer but jq rejects. Slurping and asserting a | ||||||||||||||||||||||||||||||||||
| # single object root is what "valid package.json" actually means. | ||||||||||||||||||||||||||||||||||
| run: jq -e -s 'length == 1 and (.[0] | type == "object")' package.json | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Check version format (semver) | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| VERSION=$(python3 -c "import json; print(json.load(open('package.json'))['version'])") | ||||||||||||||||||||||||||||||||||
| if echo "$VERSION" | grep -qP '^\d+\.\d+\.\d+$'; then | ||||||||||||||||||||||||||||||||||
| VERSION=$(jq -er '.version | select(type == "string")' package.json) | ||||||||||||||||||||||||||||||||||
| if [[ "$VERSION" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then | ||||||||||||||||||||||||||||||||||
|
Comment on lines
92
to
+95
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Синхронизируйте ограничение Эта проверка принимает третью компоненту версии любой длины. В Добавьте здесь такое же ограничение или вынесите правило в общий валидатор. Предлагаемое исправление if [[ "$VERSION" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
+ PATCH="${VERSION##*.}"
+ if [ "${`#PATCH`}" -gt 9 ]; then
+ echo "::error::Patch component out of range: $PATCH (expected < 1000000000)"
+ exit 1
+ fi
echo "Version: $VERSION"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| echo "Version: $VERSION" | ||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||
| echo "::error::Invalid version format: $VERSION (expected semver X.Y.Z)" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: SashaRX/UnityMeshLab
Length of output: 3285
🌐 Web query:
site:github.com/actions/checkout v4.2.2 persist-credentials default git push http.extraheader README💡 Result:
The
persist-credentialsinput is a configuration option in the GitHubactions/checkoutaction (used to check out repositories in GitHub Actions) that determines whether the authentication token used for the checkout is persisted in the local Git configuration [1][2]. When set to its default value oftrue, the action automatically configures the local Git environment—historically by adding anhttp.<url>.extraheaderto the.git/configfile—to allow subsequent Git commands (likegit fetchorgit push) within the same job to use the same authentication credentials [1][2][3]. Settingpersist-credentials: falseallows you to opt out of this behavior, preventing the action from automatically adding these headers [1][3]. Regarding the technical implementation: - Historical Context: Older versions ofactions/checkoutrelied heavily on settinghttp.extraheaderto inject theAUTHORIZATIONheader [3][4]. This approach can sometimes cause conflicts with other Git tools, such as Git LFS, or lead to issues when multiple headers are present [4]. - Version v4.2.2 and Updates: GitHubactions/checkoutv4.2.2 is a release version (published October 2024) [5]. Recent improvements in the action have transitioned away from directextraheaderusage toward using Git credential helpers (e.g.,credential.helper), which is considered a more robust and secure method for handling credentials in Git [6][2]. - Troubleshooting: If you encounter issues such as HTTP 400 errors or authentication conflicts, it is often due to malformed or persistenthttp.extraheaderconfigurations in your runner's global or local Git config [7][8]. Ensuring thatpersist-credentialsis managed correctly or manually clearing problematic headers from your Git config can resolve these issues [7][4]. In summary,persist-credentialsmanages whether the GitHub Action makes your job's authentication token available to Git commands via your local Git config, and the underlying mechanism for this has evolved fromextraheaderto more modern credential-handling approaches in recent versions [6][2][3].Citations:
🌐 Web query:
site:docs.github.com GitHub Actions permissions job step GITHUB_TOKEN persist credentials checkout💡 Result:
In GitHub Actions, the actions/checkout action uses the GITHUB_TOKEN to authenticate git operations by default [1][2]. The persist-credentials input for this action determines whether these credentials remain configured in the local git environment after the checkout step completes [1]. Key details regarding persist-credentials and GITHUB_TOKEN: 1. Behavior: When persist-credentials is set to true (which is the default), the actions/checkout action configures the local git environment to use the provided token, allowing subsequent git commands in the same job to authenticate automatically using those same credentials [1][2]. If you set persist-credentials to false, the action will not persist the token in the git configuration, preventing subsequent git commands from using it for authentication [1]. 2. Security: As a security best practice, you should grant the GITHUB_TOKEN only the minimum permissions required for your workflow [3][4][5]. You can configure these permissions at the workflow or job level using the permissions key [3][6][7]. For example, if you only need to clone a repository, you might set the contents permission to read [8][9]. 3. Usage Example: permissions: contents: read jobs: example-job: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: persist-credentials: false # Disables token persistence for git - name: Git commands run: | # Git commands here will not use the GITHUB_TOKEN automatically
Citations:
Ограничьте доступ к
contents: writeи отключите автоматическое сохранение credentials.permissions: contents: writeзадан на уровне job и действует для всех шаговcommit.actions/checkoutпо умолчанию сохраняет credentials для последующих Git-команд, поэтому текущийgit pushиспользует write-токен автоматически. Добавьтеpersist-credentials: falseи передайте токен только командеgit pushчерез временныйhttp.extraheader. GitHub Actions не поддерживает permissions на уровне шага; для изоляции вынесите публикацию в отдельный job.🤖 Prompt for AI Agents
Source: Linters/SAST tools