8000 fixed GHSA-vjvh-m6q3-jrgc by dominikwilkowski · Pull Request #112 · dominikwilkowski/vault · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
name: Create draft release
needs: [ tests ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create draft release
permissions:
packages: write
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand All @@ -38,11 +38,9 @@ jobs:
matrix:
os:
- macos-latest
- macos-14
- macos-13
- macos-12
- macos-11
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
Expand Down Expand Up @@ -129,8 +127,6 @@ jobs:
zip -r "../Vault-${{ matrix.os }}.zip" ./*

- name: Upload zip to release
permissions:
packages: write
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand All @@ -145,6 +141,8 @@ jobs:
os:
- windows-latest
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
Expand All @@ -170,8 +168,6 @@ jobs:
7z a "Vault-${{ matrix.os }}.zip" ./target/x86_64-pc-windows-msvc/release/vault.exe

- name: Upload zip to release
permissions:
packages: write
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
name: Publish to Github Pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'release' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
Expand All @@ -33,8 +35,6 @@ jobs:
sed -i "s/{{VERSION}}/$VERSION/" website/index.html

- name: Deploy
permissions:
pages: write
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # pin@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ thiserror = "2.0"
toml = "1.2"
url-escape = "0.1"
webbrowser = "1.2"
zeroize = "1.9"
zeroize = { version = "1.9", features = ["derive"] }
sha2 = "0.11"
dirs = "7.0"
rand = "0.10"
Expand Down Expand Up @@ -60,6 +60,10 @@ features = ["deadlock_detection"]
version = "1.0"
features = ["derive"]

[features]
# Allocator hook that reports secrets left in freed memory, see src/leakcheck.rs
leakcheck = []

[dev-dependencies]

[package.metadata.bundle]
Expand Down
21 changes: 20 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@ fn main() {
embed_resource::compile("./assets/assets.rc", embed_resource::NONE)
7EE3 .manifest_optional()
.unwrap();

set_windows_stack_size();
}

#[cfg(not(windows))]
fn main() {}
fn main() {
set_windows_stack_size();
}

// Windows gives the main thread a 1 MB stack, while Linux and macOS give it
// 8 MB. Unoptimised builds of the view tree need about 1 MB of stack when
// switching to AppState::Ready, which overflowed on Windows, so match the other
// platforms. This checks the target, not the host, so cross builds get it too.
fn set_windows_stack_size() {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") {
return;
}
match std::env::var("CARGO_CFG_TARGET_ENV").as_deref() {
Ok("msvc") => println!("cargo:rustc-link-arg-bins=/STACK:8388608"),
Ok("gnu") => println!("cargo:rustc-link-arg-bins=-Wl,--stack,8388608"),
_ => {},
}
}
Loading
0