-
Notifications
You must be signed in to change notification settings - Fork 3
Namefeature/typing animation #85
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
66cdada
3b8a765
07df732
1e01429
149f2d3
21639e6
5b2f150
7a65b7e
46b9539
b28868a
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 |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: CodeQL | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| branches: ["main"] | ||
| schedule: | ||
| - cron: "30 1 * * 0" | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze (javascript-typescript) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
| packages: read | ||
| actions: read | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify non-SHA action refs in workflows
rg -nP '^\s*uses:\s*[^@]+@v\d+' .github/workflowsRepository: hrx01-dev/Servio Length of output: 977 Pin GitHub Actions to commit SHAs instead of mutable version tags. Lines 23, 26, and 32 use mutable tags ( Suggested fix- - name: Checkout repository
- uses: actions/checkout@v4
+ - name: Checkout repository
+ uses: actions/checkout@<full_commit_sha>
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v3
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@<full_commit_sha>
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@<full_commit_sha>🧰 Tools🪛 zizmor (1.25.2)[warning] 22-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 23-23: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v3 | ||
| with: | ||
| languages: javascript-typescript | ||
| build-mode: none | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v3 | ||
| with: | ||
| category: "/language:javascript-typescript" | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||||||||||||||||||||||||||||||||||
| import { useEffect, useLayoutEffect, useRef } from "react"; | ||||||||||||||||||||||||||||||||||||||
| import { Routes, Route, BrowserRouter } from "react-router-dom"; | ||||||||||||||||||||||||||||||||||||||
| import { Routes, Route, useLocation, BrowserRouter } from "react-router-dom"; | ||||||||||||||||||||||||||||||||||||||
| import { AnimatePresence, motion } from "motion/react"; | ||||||||||||||||||||||||||||||||||||||
| import { Navbar } from "./components/Navbar"; | ||||||||||||||||||||||||||||||||||||||
| import { Hero } from "./components/Hero"; | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -15,6 +15,8 @@ import { FAQ } from "./components/FAQ"; | |||||||||||||||||||||||||||||||||||||
| import { FinalCTA } from "./components/FinalCTA"; | ||||||||||||||||||||||||||||||||||||||
| import { Footer } from "./components/Footer"; | ||||||||||||||||||||||||||||||||||||||
| import NotFound from "./components/NotFound"; | ||||||||||||||||||||||||||||||||||||||
| import { ServiceDetailPage } from "./components/ServiceDetailPage"; | ||||||||||||||||||||||||||||||||||||||
| import { ThemeProvider } from "./hooks/useTheme"; | ||||||||||||||||||||||||||||||||||||||
| import { SplashScreen } from "./components/SplashScreen"; | ||||||||||||||||||||||||||||||||||||||
| import { AuthProvider } from "../Firebase/AuthContext"; | ||||||||||||||||||||||||||||||||||||||
| import { SignIn } from "../Firebase/SignIn"; | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -34,6 +36,12 @@ import { PricingConfig } from "../dashboard/pages/PricingConfig"; | |||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| const REVEAL_EASE: [number, number, number, number] = [0.4, 0, 0.2, 1]; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| function ScrollToTop() { | ||||||||||||||||||||||||||||||||||||||
| const { pathname } = useLocation(); | ||||||||||||||||||||||||||||||||||||||
| useEffect(() => { window.scrollTo(0, 0); }, [pathname]); | ||||||||||||||||||||||||||||||||||||||
| return null; | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+39
to
+42
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. 🧩 Analysis chain🏁 Script executed: cat -n src/app/App.tsx | head -50Repository: hrx01-dev/Servio Length of output: 2754 🏁 Script executed: rg "`#services`|`#quote`" --type jsx --type tsx --type js --type tsRepository: hrx01-dev/Servio Length of output: 88 🏁 Script executed: rg "useLocation|scrollIntoView" -A 3 -B 3Repository: hrx01-dev/Servio Length of output: 4279 🏁 Script executed: rg "href=\"#|navigate.*#" -A 2 -B 2Repository: hrx01-dev/Servio Length of output: 3214 🏁 Script executed: grep -r "scrollToSection\|href=\"#" src/ --include="*.tsx" --include="*.ts"Repository: hrx01-dev/Servio Length of output: 2481
Line 38 calls Proposed fix function ScrollToTop() {
- const { pathname } = useLocation();
- useEffect(() => { window.scrollTo(0, 0); }, [pathname]);
+ const { pathname, hash } = useLocation();
+ useEffect(() => {
+ if (hash) {
+ const id = hash.slice(1);
+ requestAnimationFrame(() => {
+ document.getElementById(id)?.scrollIntoView({ behavior: 'auto' });
+ });
+ return;
+ }
+ window.scrollTo(0, 0);
+ }, [pathname, hash]);
return null;
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| function LandingPage() { | ||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||
| <> | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -110,11 +118,14 @@ function LandingShell() { | |||||||||||||||||||||||||||||||||||||
| aria-hidden={!loading.isReady || undefined} | ||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||
| <BrowserRouter> | ||||||||||||||||||||||||||||||||||||||
| <ThemeProvider> | ||||||||||||||||||||||||||||||||||||||
| <ScrollToTop /> | ||||||||||||||||||||||||||||||||||||||
| <AuthProvider> | ||||||||||||||||||||||||||||||||||||||
| <Routes> | ||||||||||||||||||||||||||||||||||||||
| <Route path="/" element={<LandingPage />} /> | ||||||||||||||||||||||||||||||||||||||
| <Route path="/signin" element={<SignIn />} /> | ||||||||||||||||||||||||||||||||||||||
| <Route path="/signup" element={<SignUp />} /> | ||||||||||||||||||||||||||||||||||||||
| <Route path="/services/:slug" element={<ServiceDetailPage />} /> | ||||||||||||||||||||||||||||||||||||||
| <Route | ||||||||||||||||||||||||||||||||||||||
| path="/dashboard" | ||||||||||||||||||||||||||||||||||||||
| element={ | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -135,6 +146,7 @@ function LandingShell() { | |||||||||||||||||||||||||||||||||||||
| <Route path="*" element={<NotFound />} /> | ||||||||||||||||||||||||||||||||||||||
| </Routes> | ||||||||||||||||||||||||||||||||||||||
| </AuthProvider> | ||||||||||||||||||||||||||||||||||||||
| </ThemeProvider> | ||||||||||||||||||||||||||||||||||||||
| </BrowserRouter> | ||||||||||||||||||||||||||||||||||||||
| </motion.div> | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: hrx01-dev/Servio
Length of output: 1496
🌐 Web query:
GitHub actions checkout persist-credentials false security best practice💡 Result:
Setting persist-credentials: false is considered a security best practice for GitHub Actions workflows that do not require authenticated Git operations [1][2][3]. By default, the actions/checkout action is configured with persist-credentials: true [4][2]. This setting automatically persists the authentication token (typically GITHUB_TOKEN) into the local Git configuration of the checked-out repository [4][5][3]. This behavior was originally designed to allow subsequent steps in a workflow to perform authenticated Git operations, such as git fetch or git push, without additional configuration [4][6][7]. However, this practice introduces several security risks: - Credential Exposure in Artifacts: If a workflow archives or uploads the repository directory as an artifact, the persisted credentials stored in.git/config may be included and leaked [2][3]. - Unauthorized Access: Any subsequent step or third-party action executed within the same job can read these credentials from the Git configuration and potentially use them to perform unauthorized actions, such as pushing commits or accessing other repository data [5][2][3]. To mitigate these risks, you should explicitly set persist-credentials to false in your workflow definition whenever your job does not need to perform authenticated Git commands [1][2][3]: - uses: actions/checkout@v4 with: persist-credentials: false While modern versions of actions/checkout have improved security by storing credentials in a separate file under $RUNNER_TEMP rather than directly in.git/config [4][6][7], setting persist-credentials: false remains the recommended practice to adhere to the principle of least privilege and minimize the exposure of sensitive tokens [1][2]. If your workflow does require authenticated Git operations, ensure that your GITHUB_TOKEN permissions are scoped as strictly as possible [5].
Citations:
persist-credentialsor change the default tofalseactions/checkout#485🏁 Script executed:
Repository: hrx01-dev/Servio
Length of output: 892
Add
persist-credentials: falseto the checkout step.The
actions/checkoutstep should explicitly disable credential persistence to prevent the GITHUB_TOKEN from being stored in the Git configuration, reducing the risk of token exposure in artifacts or unauthorized access by subsequent steps.Suggested hardening
- name: Checkout repository uses: actions/checkout@v4 + with: + persist-credentials: falseThis is a security best practice recommended by OWASP and aligns with the principle of least privilege.
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 22-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 23-23: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Source: Linters/SAST tools