Skip to content

Commit 416ae65

Browse files
committed
Merge branch 'master'
2 parents 109c51b + 1b7e2fb commit 416ae65

30 files changed

Lines changed: 8492 additions & 521 deletions

.codesandbox/package-lock.json

Lines changed: 6029 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.codesandbox/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@
1616
"clear:vite:cache": "rimraf node_modules/.vite/"
1717
},
1818
"dependencies": {
19-
"0xsequence": "2.2.3",
2019
"@0xsequence/abi": "2.2.13",
2120
"@0xsequence/design-system": "^1.8.1",
2221
"@0xsequence/ethauth": "^1.0.0",
2322
"@0xsequence/network": "2.2.13",
2423
"@0xsequence/provider": "2.2.13",
2524
"@0xsequence/utils": "2.2.13",
2625
"@types/node": "^20.11.30",
27-
"@types/react": "^18.3.7",
2826
"@types/react-dom": "^18.3.0",
2927
"@vanilla-extract/css": "^1.14.1",
28+
"0xsequence": "2.2.3",
3029
"ethers": "^6.13.4",
3130
"framer-motion": "^9.0.1",
3231
"react": "^18.3.1",
3332
"react-dom": "^18.3.1",
3433
"typescript": "^4.5.5"
3534
},
3635
"devDependencies": {
36+
"@types/react": "^18.3.28",
3737
"@vanilla-extract/vite-plugin": "^4.0.6",
3838
"@vitejs/plugin-react": "^4.2.1",
3939
"vite": "^5.2.6",

.codesandbox/src/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ For complete documentation on Sequence, please see: [https://docs.sequence.build
1010
## Usage
1111

1212
1. pnpm install
13-
2. pnpm dev
13+
2. pnpm start
1414
3. Open browser to http://localhost:4000 to access the demo dapp
1515
4. Open browser inspector to see responses from the remote Sequence Wallet
1616

1717
## Development
1818

19-
See https://github.com/0xsequence/demo-dapp/blob/master/src/routes/HomeRoute.tsx for the source
20-
usage for a variety of functions. be sure t open your browser's dev inspector to see output.
19+
See [src/App.tsx](./src/App.tsx) for the source
20+
usage for a variety of functions. Be sure to open your browser's dev inspector to see output.
2121
Think of these functions as a "cookbook" for how you can perform these functions in your dapps.
2222

2323
Also note, sequence.js is built on top of ethers.js, and is API-compatible.

.codesandbox/src/components/Console/index.tsx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,24 @@ export const Console = ({ message, loading }: ConsoleProps) => {
1616
}
1717

1818
return (
19-
<Collapsible label="Console" defaultOpen>
20-
<Box as="pre" color="text80" style={{ fontFamily: 'monospace', whiteSpace: 'break-spaces', overflowWrap: 'anywhere' }}>
21-
{message}
22-
{loading && getLoadingDots()}
23-
{
24-
<Box
25-
className={styles.cursor}
26-
display="inline-block"
27-
fontSize="large"
28-
lineHeight="4"
29-
style={{ top: '-4px', position: 'relative' }}
30-
>
31-
_
32-
</Box>
33-
}
34-
</Box>
35-
</Collapsible>
19+
newFunction(message, loading, getLoadingDots)
3620
)
3721
}
22+
function newFunction(message: string | null, loading: boolean, getLoadingDots: () => "\n..." | "...") {
23+
return <Collapsible label="Console" defaultOpen>
24+
<Box as="pre" color="text80" style={{ fontFamily: 'monospace', whiteSpace: 'break-spaces', overflowWrap: 'anywhere' }}>
25+
{message}
26+
{loading && getLoadingDots()}
27+
{<Box
28+
className={styles.cursor}
29+
display="inline-block"
30+
fontSize="large"
31+
lineHeight="4"
32+
style={{ top: '-4px', position: 'relative' }}
33+
>
34+
_
35+
</Box>}
36+
</Box>
37+
</Collapsible>
38+
}
39+

.codesandbox/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
// These tasks will run in order when initializing your CodeSandbox project.
2+
33
"setupTasks": [
44
{
55
"name": "Install Dependencies",
66
"command": "pnpm install"
77
}
88
],
99

10-
// These tasks can be run from CodeSandbox. Running one will open a log in the app.
10+
1111
"tasks": {
1212
"build": {
1313
"name": "build",

.github/workflows/neuralegion.yml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
#
6+
# Run a Nexploit Scan
7+
# This action runs a new security scan in Nexploit, or reruns an existing one.
8+
# Build Secure Apps & APIs. Fast.
9+
# [NeuraLegion](https://www.neuralegion.com) is a powerful dynamic application & API security testing (DAST) platform that security teams trust and developers love.
10+
# Automatically Tests Every Aspect of Your Apps & APIs
11+
# Scans any target, whether Web Apps, APIs (REST. & SOAP, GraphQL & more), Web sockets or mobile, providing actionable reports
12+
# Seamlessly integrates with the Tools and Workflows You Already Use
13+
#
14+
# NeuraLegion works with your existing CI/CD pipelines – trigger scans on every commit, pull request or build with unit testing.
15+
# Spin-Up, Configure and Control Scans with Code
16+
# One file. One command. One scan. No UI needed.
17+
#
18+
# Super-Fast Scans
19+
#
20+
# Interacts with applications and APIs, instead of just crawling them and guessing.
21+
# Scans are fast as our AI-powered engine can understand application architecture and generate sophisticated and targeted attacks.
22+
#
23+
# No False Positives
24+
#
25+
# Stop chasing ghosts and wasting time. NeuraLegion doesn’t return false positives, so you can focus on releasing code.
26+
#
27+
# Comprehensive Security Testing
28+
#
29+
# NeuraLegion tests for all common vulnerabilities, such as SQL injection, CSRF, XSS, and XXE -- as well as uncommon vulnerabilities, such as business logic vulnerabilities.
30+
#
31+
# More information is available on NeuraLegion’s:
32+
# * [Website](https://www.neuralegion.com/)
33+
# * [Knowledge base](https://docs.neuralegion.com/docs/quickstart)
34+
# * [YouTube channel](https://www.youtube.com/channel/UCoIC0T1pmozq3eKLsUR2uUw)
35+
# * [GitHub Actions](https://github.com/marketplace?query=neuralegion+)
36+
#
37+
# Inputs
38+
#
39+
# `name`
40+
#
41+
# **Required**. Scan name.
42+
#
43+
# _Example:_ `name: GitHub scan ${{ github.sha }}`
44+
#
45+
# `api_token`
46+
#
47+
# **Required**. Your Nexploit API authorization token (key). You can generate it in the **Organization** section on [nexploit.app](https://nexploit.app/login). Find more information [here](https://kb.neuralegion.com/#/guide/np-web-ui/advanced-set-up/managing-org?id=managing-organization-apicli-authentication-tokens).
48+
#
49+
# _Example:_ `api_token: ${{ secrets.NEXPLOIT_TOKEN }}`
50+
#
51+
# `restart_scan`
52+
#
53+
# **Required** when restarting an existing scan by its ID. You can get the scan ID in the Scans section on [nexploit.app](https://nexploit.app/login).<br> Please make sure to only use the necessary parameters. Otherwise, you will get a response with the parameter usage requirements.
54+
#
55+
# _Example:_ `restart_scan: ai3LG8DmVn9Rn1YeqCNRGQ)`
56+
#
57+
# `discovery_types`
58+
#
59+
# **Required**. Array of discovery types. The following types are available:
60+
# * `archive` - uses an uploaded HAR-file for a scan
61+
# * `crawler` - uses a crawler to define the attack surface for a scan
62+
# * `oas` - uses an uploaded OpenAPI schema for a scan <br>
63+
# If no discovery type is specified, `crawler` is applied by default.
64+
#
65+
# _Example:_
66+
#
67+
# ```yml
68+
# discovery_types: |
69+
# [ "crawler", "archive" ]
70+
# ```
71+
#
72+
# `file_id`
73+
#
74+
# **Required** if the discovery type is set to `archive` or `oas`. ID of a HAR-file or an OpenAPI schema you want to use for a scan. You can get the ID of an uploaded HAR-file or an OpenAPI schema in the **Storage** section on [nexploit.app](https://nexploit.app/login).
75+
#
76+
# _Example:_
77+
#
78+
# ```
79+
# FILE_ID=$(nexploit-cli archive:upload \
80+
# --token ${{ secrets.NEXPLOIT_TOKEN }} \
81+
# --discard true \
82+
# ./example.har)
83+
# ```
84+
#
85+
# `crawler_urls`
86+
#
87+
# **Required** if the discovery type is set to `crawler`. Target URLs to be used by the crawler to define the attack surface.
88+
#
89+
# _Example:_
90+
#
91+
# ```
92+
# crawler_urls: |
93+
# [ "http://vulnerable-bank.com" ]
94+
# ```
95+
#
96+
# `hosts_filter`
97+
#
98+
# **Required** when the the discovery type is set to `archive`. Allows selecting specific hosts for a scan.
99+
#
100+
# Outputs
101+
#
102+
# `url`
103+
#
104+
# Url of the resulting scan
105+
#
106+
# `id`
107+
#
108+
# ID of the created scan. This ID could then be used to restart the scan, or for the following GitHub actions:
109+
# * [Nexploit Wait for Issues](https://github.com/marketplace/actions/nexploit-wait-for-issues)
110+
# * [Nexploit Stop Scan](https://github.com/marketplace/actions/nexploit-stop-scan)
111+
#
112+
# Example usage
113+
#
114+
# Start a new scan with parameters
115+
#
116+
# ```yml
117+
# steps:
118+
# - name: Start Nexploit Scan
119+
# id: start
120+
# uses: NeuraLegion/run-scan@29ebd17b4fd6292ce7a238a59401668953b37fbe
121+
# with:
122+
# api_token: ${{ secrets.NEXPLOIT_TOKEN }}
123+
# name: GitHub scan ${{ github.sha }}
124+
# discovery_types: |
125+
# [ "crawler", "archive" ]
126+
# crawler_urls: |
127+
# [ "http://vulnerable-bank.com" ]
128+
# file_id: LiYknMYSdbSZbqgMaC9Sj
129+
# hosts_filter: |
130+
# [ ]
131+
# - name: Get the output scan url
132+
# run: echo "The scan was started on ${{ steps.start.outputs.url }}"
133+
# ```
134+
#
135+
# Restart an existing scan
136+
#
137+
# ```yml
138+
# steps:
139+
# - name: Start Nexploit Scan
140+
# id: start
141+
# uses: NeuraLegion/run-scan@29ebd17b4fd6292ce7a238a59401668953b37fbe
142+
# with:
143+
# api_token: ${{ secrets.NEXPLOIT_TOKEN }}
144+
# name: GitHub scan ${{ github.sha }}
145+
# restart_scan: ai3LG8DmVn9Rn1YeqCNRGQ
146+
# - name: Get the output scan url
147+
# run: echo "The scan was started on ${{ steps.start.outputs.url }}"
148+
149+
150+
name: "NeuraLegion"
151+
152+
on:
153+
push:
154+
branches: [ "master" ]
155+
pull_request:
156+
branches: [ "master" ]
157+
schedule:
158+
- cron: '31 8 * * 2'
159+
160+
jobs:
161+
neuralegion_scan:
162+
runs-on: ubuntu-18.04
163+
name: A job to run a Nexploit scan
164+
permissions:
165+
contents: read
166+
steps:
167+
- uses: actions/checkout@v4
168+
- name: Start Nexploit Scan 🏁
169+
id: start
170+
uses: NeuraLegion/run-scan@29ebd17b4fd6292ce7a238a59401668953b37fbe
171+
with:
172+
api_token: ${{ secrets.NEURALEGION_TOKEN }}
173+
name: GitHub scan ${{ github.sha }}
174+
discovery_types: |
175+
[ "crawler" ]
176+
crawler_urls: |
177+
[ "https://brokencrystals.com" ] # ✏️ Update this to the url you wish to scan

.github/workflows/nextjs.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)