Skip to content

Commit

Permalink
Merge pull request #4 from Onboardbase/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Mahmoudgalalz authored Oct 14, 2024
2 parents 32e7d93 + 1932dde commit 58fc191
Show file tree
Hide file tree
Showing 9 changed files with 1,129 additions and 16 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- main
- dev
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Deploying to Dev
uses: appleboy/[email protected]
if: github.ref == 'refs/heads/dev'
with:
host: ${{ secrets.DEV_SERVER }}
username: ${{ secrets.DEV_USER }}
key: ${{ secrets.DEV_SSH_KEY }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /root/apps/securelog-rsc-example
git pull origin dev
yarn install
onboardbase run -c 'yarn build'
cp -r dist/* /var/www/secure-example
systemctl reload nginx
- name: Deploying to prod
uses: appleboy/[email protected]
if: github.ref == 'refs/heads/main'
with:
host: ${{ secrets.PROD_SERVER }}
username: ${{ secrets.PROD_USER }}
key: ${{ secrets.PROD_SSH_KEY }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /root/apps/securelog-rsc-example
git pull origin main
yarn install
onboardbase run -c 'yarn build'
cp -r dist/* /var/www/secure-example
systemctl reload nginx
Binary file added favicon.ico
Binary file not shown.
18 changes: 15 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,22 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Test SecureLogContainer</title>

<meta
http-equiv="Cache-Control"
content="no-cache, no-store, must-revalidate"
/>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="theme-color" content="#1A202C" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>Securelog RSC Test</title>
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<link href="./src/output.css" rel="stylesheet">
</head>
<body>
<div id="root"></div>
<body class="bg-black text-white">
<div id="root" class="max-w-xl mx-auto my-20"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@
"serve": "vite preview"
},
"dependencies": {
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"postcss": "^8.4.47",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"securelog-rsc": "^1.0.2"
"securelog-rsc": "^1.0.2",
"tailwindcss": "^3.4.13"
},
"devDependencies": {
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@vitejs/plugin-react": "^2.0.0",
"autoprefixer": "^10.4.20",
"typescript": "^4.0.0",
"vite": "^4.0.0"
}
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
53 changes: 41 additions & 12 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,53 @@ export const HomeComponent = (props: any) => {
handleSecretsFound(result);
}}
>
this is a test anthropic secret
sk-ant-api03-ha5kz3GnNTiS9ScbDD0Xuf1BAleGb8Xj8wMZnTZYaioVPtxPV6wcBPYtCKYor2z8JE1gQ6sUXBj0enoln2wjuQ-lI7F-wAA{" "}
Secret Masking is enabled for this secret hence why you can't see the
secret value
<p>
This app sends any secret found to an API that in return sends the
secret to our public slack channel. This is just an example of a good
usecase for this component message
</p>
<div className="text-gray-400 mb-6 border border-dashed border-gray-500/25 rounded-lg p-4 break-words break-all">
This is a test anthropic secret
<span className="text-[#F5BE58] ml-2">
sk-ant-api03-ha5kz3GnNTiS9ScbDD0Xuf1BAleGb8Xj8wMZnTZYaioVPtxPV6wcBPYtCKYor2z8JE1gQ6sUXBj0enoln2wjuQ-lI7F-wAA{" "}
</span>
</div>
<ol
className="list-inside list-decimal text-sm text-center sm:text-left text-gray-400 my-5 space-y-3"
>
<li>Secret masking is enabled for this secret hence why you can't see the
secret value.</li>
<li>
This test app sends any secret found to an API that sends the
secret to our <span className="text-white">public slack securelog-exam channel</span>. This is just an example of a good
usecase for this component message.
</li>
<li>Join us on <a href="#https://join.slack.com/t/onboardbase-community/shared_invite/zt-1hqckrw8l-~RjaGExoczIk7e0X_4ZiWw" className="text-[#F5BE58]" target="_blank">slack</a>.</li>
</ol>
</SecureLog>
);
};

const App = () => (
<div>
<h1>SecureLog React Component</h1>
<div className="relative flex flex-col p-8 sm:p-20">
<h1 className="text-3xl font-semibold mb-6">Securelog React Component</h1>
<HomeComponent />
</div>
<div className="text-gray-400 mt-10">
<a
className="flex items-center gap-2 hover:underline text-sm"
href="https://securelog.com"
target="_blank"
rel="noopener noreferrer"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
className="size-4"
>
<path
d="M16.555 5.412a8.028 8.028 0 0 0-3.503-2.81 14.899 14.899 0 0 1 1.663 4.472 8.547 8.547 0 0 0 1.84-1.662ZM13.326 7.825a13.43 13.43 0 0 0-2.413-5.773 8.087 8.087 0 0 0-1.826 0 13.43 13.43 0 0 0-2.413 5.773A8.473 8.473 0 0 0 10 8.5c1.18 0 2.304-.24 3.326-.675ZM6.514 9.376A9.98 9.98 0 0 0 10 10c1.226 0 2.4-.22 3.486-.624a13.54 13.54 0 0 1-.351 3.759A13.54 13.54 0 0 1 10 13.5c-1.079 0-2.128-.127-3.134-.366a13.538 13.538 0 0 1-.352-3.758ZM5.285 7.074a14.9 14.9 0 0 1 1.663-4.471 8.028 8.028 0 0 0-3.503 2.81c.529.638 1.149 1.199 1.84 1.66ZM17.334 6.798a7.973 7.973 0 0 1 .614 4.115 13.47 13.47 0 0 1-3.178 1.72 15.093 15.093 0 0 0 .174-3.939 10.043 10.043 0 0 0 2.39-1.896ZM2.666 6.798a10.042 10.042 0 0 0 2.39 1.896 15.196 15.196 0 0 0 .174 3.94 13.472 13.472 0 0 1-3.178-1.72 7.973 7.973 0 0 1 .615-4.115ZM10 15c.898 0 1.778-.079 2.633-.23a13.473 13.473 0 0 1-1.72 3.178 8.099 8.099 0 0 1-1.826 0 13.47 13.47 0 0 1-1.72-3.178c.855.151 1.735.23 2.633.23ZM14.357 14.357a14.912 14.912 0 0 1-1.305 3.04 8.027 8.027 0 0 0 4.345-4.345c-.953.542-1.971.981-3.04 1.305ZM6.948 17.397a8.027 8.027 0 0 1-4.345-4.345c.953.542 1.971.981 3.04 1.305a14.912 14.912 0 0 0 1.305 3.04Z"
/>
</svg>
Go to securelog.com →
</a>
</div>
</div>
);

export default App;
3 changes: 3 additions & 0 deletions src/input.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
Loading

0 comments on commit 58fc191

Please sign in to comment.