From b8117da70ae4f0f404b7626089585d0ff59b44e0 Mon Sep 17 00:00:00 2001 From: cn-kali-team Date: Sun, 18 Feb 2024 07:41:26 +0800 Subject: [PATCH] rename to scap --- .github/workflows/doc.yml | 2 +- .github/workflows/docker-publish.yml | 4 ++-- .github/workflows/fly.yml | 2 +- Cargo.toml | 2 +- DockerfileFly | 2 +- README.md | 10 +++++----- Trunk.toml | 2 +- fly.toml | 4 ++-- nvd-api/Cargo.toml | 4 ++-- nvd-api/src/lib.rs | 2 +- nvd-cpe/Cargo.toml | 4 ++-- nvd-cpe/README.md | 2 +- nvd-cpe/src/lib.rs | 4 ++-- nvd-cves/Cargo.toml | 4 ++-- nvd-cves/src/lib.rs | 4 ++-- nvd-cvss/Cargo.toml | 4 ++-- nvd-cvss/src/lib.rs | 4 ++-- nvd-cwe/Cargo.toml | 4 ++-- nvd-cwe/src/lib.rs | 2 +- nvd-model/Cargo.toml | 4 ++-- nvd-server/Cargo.toml | 4 ++-- nvd-server/src/api/mod.rs | 2 +- nvd-server/src/main.rs | 2 +- nvd-yew/Cargo.toml | 4 ++-- nvd-yew/index.html | 2 +- nvd-yew/src/component/comments.rs | 2 +- nvd-yew/src/layout/nav.rs | 2 +- nvd-yew/src/routes/home.rs | 2 +- src/lib.rs | 2 +- 29 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 857f8e4..a270c9c 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -9,7 +9,7 @@ env: jobs: rustdoc: - if: github.repository == 'emo-crab/nvd-rs' + if: github.repository == 'emo-crab/scap-rs' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 85ecfbc..053a37f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -33,8 +33,8 @@ jobs: context: . platforms: linux/amd64 push: true - tags: ${{ secrets.DOCKER_USERNAME }}/nvd-rs:latest - cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/nvd-rs:latest + tags: ${{ secrets.DOCKER_USERNAME }}/scap-rs:latest + cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/scap-rs:latest cache-to: type=inline - name: Build and push helper uses: docker/build-push-action@v5 diff --git a/.github/workflows/fly.yml b/.github/workflows/fly.yml index 1a2b464..6621c6b 100644 --- a/.github/workflows/fly.yml +++ b/.github/workflows/fly.yml @@ -9,7 +9,7 @@ on: jobs: deploy: name: Deploy app - if: github.repository == 'emo-crab/nvd-rs' + if: github.repository == 'emo-crab/scap-rs' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/Cargo.toml b/Cargo.toml index 7035501..13089f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -#name = "nvd-rs" #改这个 +#name = "scap-rs" #改这个 version = "0.1.0" edition = "2021" authors = ["Kali-Team "] diff --git a/DockerfileFly b/DockerfileFly index 21b37eb..92d71d3 100644 --- a/DockerfileFly +++ b/DockerfileFly @@ -2,7 +2,7 @@ FROM kaliteam/nvd-helper-rs:latest AS helper # Use any runner as you want # But beware that some images have old glibc which makes rust unhappy -FROM kaliteam/nvd-rs:latest AS runner +FROM kaliteam/scap-rs:latest AS runner WORKDIR /prod ENV TZ=Asia/Shanghai COPY --from=helper /prod/helper /prod diff --git a/README.md b/README.md index 11266d9..c50db52 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# nvd-rs +# scap-rs --- - A collection of lib for working with [National Vulnerability Database](https://nvd.nist.gov/). @@ -7,7 +7,7 @@ ### cvss 通用漏洞评分系统 -[![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-cvss) +[![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cvss)  [![docs-rs]](crate) [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github @@ -18,7 +18,7 @@ ### cve 通用漏洞披露 -[![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-cves) +[![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cves)  [![docs-rs]](crate) [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github @@ -29,7 +29,7 @@ ### cpe 通用平台枚举 -[![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-cpe) +[![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cpe)  [![docs-rs]](crate) [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github @@ -40,7 +40,7 @@ ### cwe 通用弱点枚举 -[![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-cwe) +[![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cwe)  [![docs-rs]](crate) [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github diff --git a/Trunk.toml b/Trunk.toml index 9448c0e..861020c 100644 --- a/Trunk.toml +++ b/Trunk.toml @@ -3,4 +3,4 @@ target = "nvd-yew/index.html" dist = "dist" [[proxy]] -backend = "https://nvd.kali-team.cn/api/" \ No newline at end of file +backend = "https://scap.kali-team.cn/api/" \ No newline at end of file diff --git a/fly.toml b/fly.toml index 22dae74..c78452e 100644 --- a/fly.toml +++ b/fly.toml @@ -1,9 +1,9 @@ -# fly.toml app configuration file generated for nvd-rs on 2023-12-04T22:33:51+08:00 +# fly.toml app configuration file generated for scap-rs on 2023-12-04T22:33:51+08:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # -app = "nvd-rs" +app = "scap-rs" primary_region = "hkg" [build] dockerfile = "DockerfileFly" diff --git a/nvd-api/Cargo.toml b/nvd-api/Cargo.toml index e051a85..2a9bae7 100644 --- a/nvd-api/Cargo.toml +++ b/nvd-api/Cargo.toml @@ -2,8 +2,8 @@ name = "nvd-api" edition = "2021" description = "A rust implementation of the nvd-api." -homepage = "https://github.com/emo-crab/nvd-rs" -repository = "https://github.com/emo-crab/nvd-rs" +homepage = "https://github.com/emo-crab/scap-rs" +repository = "https://github.com/emo-crab/scap-rs" authors = ["Kali-Team "] readme = "README.md" license.workspace = true diff --git a/nvd-api/src/lib.rs b/nvd-api/src/lib.rs index dbc770f..949a221 100644 --- a/nvd-api/src/lib.rs +++ b/nvd-api/src/lib.rs @@ -1,4 +1,4 @@ -//! [![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-api) [![docs-rs]](crate) +//! [![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-api) [![docs-rs]](crate) //! //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust diff --git a/nvd-cpe/Cargo.toml b/nvd-cpe/Cargo.toml index 3ceb5e1..7d9f413 100644 --- a/nvd-cpe/Cargo.toml +++ b/nvd-cpe/Cargo.toml @@ -2,8 +2,8 @@ name = "nvd-cpe" edition = "2021" description = "A rust implementation of the nvd-cpe." -homepage = "https://github.com/emo-crab/nvd-rs" -repository = "https://github.com/emo-crab/nvd-rs" +homepage = "https://github.com/emo-crab/scap-rs" +repository = "https://github.com/emo-crab/scap-rs" authors = ["Kali-Team "] readme = "README.md" license.workspace = true diff --git a/nvd-cpe/README.md b/nvd-cpe/README.md index 25e7637..5e0b9f4 100644 --- a/nvd-cpe/README.md +++ b/nvd-cpe/README.md @@ -1,6 +1,6 @@ ## CPE -[![github]](https://github.com/emo-crab/nvd-rs) +[![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cpe) [![docs-rs]](crate) diff --git a/nvd-cpe/src/lib.rs b/nvd-cpe/src/lib.rs index 1828a8e..9644035 100644 --- a/nvd-cpe/src/lib.rs +++ b/nvd-cpe/src/lib.rs @@ -1,4 +1,4 @@ -//! [![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-cpe) [![docs-rs]](crate) +//! [![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cpe) [![docs-rs]](crate) //! //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust @@ -14,7 +14,7 @@ //! The CPE Dictionary hosted and maintained at NIST may be used by nongovernmental organizations on a voluntary basis and is not subject to copyright in the United States. Attribution would, however, be appreciated by NIST. //! -#![doc(html_root_url = "https://emo-crab.github.io/nvd-rs/cpe")] +#![doc(html_root_url = "https://emo-crab.github.io/scap-rs/cpe")] // Package wfn provides a representation, bindings and matching of the Well-Formed CPE names as per // https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7695.pdf and diff --git a/nvd-cves/Cargo.toml b/nvd-cves/Cargo.toml index c736bb0..b19318f 100644 --- a/nvd-cves/Cargo.toml +++ b/nvd-cves/Cargo.toml @@ -2,8 +2,8 @@ name = "nvd-cves" edition = "2021" description = "A rust implementation of the nvd-cve." -homepage = "https://github.com/emo-crab/nvd-rs" -repository = "https://github.com/emo-crab/nvd-rs" +homepage = "https://github.com/emo-crab/scap-rs" +repository = "https://github.com/emo-crab/scap-rs" authors = ["Kali-Team "] readme = "README.md" license.workspace = true diff --git a/nvd-cves/src/lib.rs b/nvd-cves/src/lib.rs index 6279acd..18aa69d 100644 --- a/nvd-cves/src/lib.rs +++ b/nvd-cves/src/lib.rs @@ -1,4 +1,4 @@ -//! [![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-cves) [![docs-rs]](crate) +//! [![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cves) [![docs-rs]](crate) //! //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust @@ -14,7 +14,7 @@ //! //! -#![doc(html_root_url = "https://emo-crab.github.io/nvd-rs/cve")] +#![doc(html_root_url = "https://emo-crab.github.io/scap-rs/cve")] pub mod api; pub mod error; diff --git a/nvd-cvss/Cargo.toml b/nvd-cvss/Cargo.toml index 827b864..952e83b 100644 --- a/nvd-cvss/Cargo.toml +++ b/nvd-cvss/Cargo.toml @@ -2,8 +2,8 @@ name = "nvd-cvss" edition = "2021" description = "A rust implementation of the nvd-cvss." -homepage = "https://github.com/emo-crab/nvd-rs" -repository = "https://github.com/emo-crab/nvd-rs" +homepage = "https://github.com/emo-crab/scap-rs" +repository = "https://github.com/emo-crab/scap-rs" authors = ["Kali-Team "] readme = "README.md" license.workspace = true diff --git a/nvd-cvss/src/lib.rs b/nvd-cvss/src/lib.rs index ff1e901..b880240 100644 --- a/nvd-cvss/src/lib.rs +++ b/nvd-cvss/src/lib.rs @@ -1,4 +1,4 @@ -//! [![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-cvss) [![docs-rs]](crate) +//! [![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cvss) [![docs-rs]](crate) //! //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust @@ -11,7 +11,7 @@ //! //! CVSS is owned and managed by FIRST.Org, Inc. (FIRST), a US-based non-profit organization, whose mission is to help computer security incident response teams across the world. The official CVSS documentation can be found at . -#![doc(html_root_url = "https://emo-crab.github.io/nvd-rs/cvss")] +#![doc(html_root_url = "https://emo-crab.github.io/scap-rs/cvss")] // 通用漏洞评分系统 // https://csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v3.x_beta.json // https://www.first.org/cvss/specification-document diff --git a/nvd-cwe/Cargo.toml b/nvd-cwe/Cargo.toml index dec7a9e..204a8b4 100644 --- a/nvd-cwe/Cargo.toml +++ b/nvd-cwe/Cargo.toml @@ -2,8 +2,8 @@ name = "nvd-cwe" edition = "2021" description = "A rust implementation of the nvd-cwe." -homepage = "https://github.com/emo-crab/nvd-rs" -repository = "https://github.com/emo-crab/nvd-rs" +homepage = "https://github.com/emo-crab/scap-rs" +repository = "https://github.com/emo-crab/scap-rs" authors = ["Kali-Team "] readme = "README.md" license.workspace = true diff --git a/nvd-cwe/src/lib.rs b/nvd-cwe/src/lib.rs index bffd289..3498ed8 100644 --- a/nvd-cwe/src/lib.rs +++ b/nvd-cwe/src/lib.rs @@ -1,4 +1,4 @@ -//! [![github]](https://github.com/emo-crab/nvd-rs) [![crates-io]](https://crates.io/crates/nvd-cwe) [![docs-rs]](crate) +//! [![github]](https://github.com/emo-crab/scap-rs) [![crates-io]](https://crates.io/crates/nvd-cwe) [![docs-rs]](crate) //! //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust diff --git a/nvd-model/Cargo.toml b/nvd-model/Cargo.toml index 4b50b65..d23c071 100644 --- a/nvd-model/Cargo.toml +++ b/nvd-model/Cargo.toml @@ -1,8 +1,8 @@ [package] edition = "2021" description = "A rust implementation of the nvd-model." -homepage = "https://github.com/emo-crab/nvd-rs" -repository = "https://github.com/emo-crab/nvd-rs" +homepage = "https://github.com/emo-crab/scap-rs" +repository = "https://github.com/emo-crab/scap-rs" name = "nvd-model" authors = ["Kali-Team "] readme = "README.md" diff --git a/nvd-server/Cargo.toml b/nvd-server/Cargo.toml index 1e0564c..bfe11da 100644 --- a/nvd-server/Cargo.toml +++ b/nvd-server/Cargo.toml @@ -2,8 +2,8 @@ name = "nvd-server" edition = "2021" description = "A rust implementation of the nvd-server." -homepage = "https://github.com/emo-crab/nvd-rs" -repository = "https://github.com/emo-crab/nvd-rs" +homepage = "https://github.com/emo-crab/scap-rs" +repository = "https://github.com/emo-crab/scap-rs" authors = ["Kali-Team "] readme = "README.md" license = "GPLv3" diff --git a/nvd-server/src/api/mod.rs b/nvd-server/src/api/mod.rs index 71cf78c..516fbf2 100644 --- a/nvd-server/src/api/mod.rs +++ b/nvd-server/src/api/mod.rs @@ -27,7 +27,7 @@ vendor_api::api_vendor_list, exploit_api::api_exp_list, ), components(schemas(Cve, Cwe, Product, Vendor)), -tags((name = "nvd-rs open api", description = "National Vulnerability Database (NVD) implemented by rust")), +tags((name = "scap-rs open api", description = "National Vulnerability Database (NVD) implemented by rust")), )] pub struct ApiDoc; diff --git a/nvd-server/src/main.rs b/nvd-server/src/main.rs index cdb4e7b..49e50ed 100644 --- a/nvd-server/src/main.rs +++ b/nvd-server/src/main.rs @@ -36,7 +36,7 @@ async fn main() -> std::io::Result<()> { .service( web::scope("api") .guard(guard::Get()) - .guard(guard::Any(guard::Host("nvd.kali-team.cn")).or(guard::Host("127.0.0.1"))) + .guard(guard::Any(guard::Host("scap.kali-team.cn")).or(guard::Host("127.0.0.1"))) .configure(api_route), ) .service(sitemap); diff --git a/nvd-yew/Cargo.toml b/nvd-yew/Cargo.toml index 4a6dff1..2ee8326 100644 --- a/nvd-yew/Cargo.toml +++ b/nvd-yew/Cargo.toml @@ -2,8 +2,8 @@ name = "nvd-yew" edition = "2021" description = "A rust implementation of the nvd-yew." -homepage = "https://github.com/emo-crab/nvd-rs" -repository = "https://github.com/emo-crab/nvd-rs" +homepage = "https://github.com/emo-crab/scap-rs" +repository = "https://github.com/emo-crab/scap-rs" authors = ["Kali-Team "] readme = "README.md" license = "GPLv3" diff --git a/nvd-yew/index.html b/nvd-yew/index.html index bc56fe1..a0a801c 100644 --- a/nvd-yew/index.html +++ b/nvd-yew/index.html @@ -3,7 +3,7 @@ - nvd-rs + scap-rs diff --git a/nvd-yew/src/component/comments.rs b/nvd-yew/src/component/comments.rs index 4280f6c..971b4e8 100644 --- a/nvd-yew/src/component/comments.rs +++ b/nvd-yew/src/component/comments.rs @@ -15,7 +15,7 @@ impl Component for Comments { html! {