Skip to content

Commit b368a2d

Browse files
author
Bingle Kruger
committed
chore: add/update license headers
1 parent e8f1976 commit b368a2d

19 files changed

+420
-6
lines changed

.github/workflows/license-check.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ jobs:
6262
MISSING_LICENSE=0
6363
6464
for file in $FILES; do
65-
if [[ $file =~ \.(js|jsx|ts|tsx|py|cpp|c|h|rs|css|scss|sass|less|html|md|sh|toml|yml|yaml|json|Dockerfile)$ ]] || file "$file" | grep -q "ASCII text"; then
65+
# Skip JSON files
66+
if [[ $file =~ \.json$ ]]; then
67+
continue
68+
fi
69+
70+
if [[ $file =~ \.(js|jsx|ts|tsx|py|cpp|c|h|rs|css|scss|sass|less|html|md|sh|toml|yml|yaml|Dockerfile|prisma|cargo)$ ]] || file "$file" | grep -q "ASCII text"; then
6671
if [ -f "$file" ] && ! grep -q "Copyright" "$file"; then
6772
echo "::error::Missing license in: $file"
6873
MISSING_LICENSE=1

README.md

+45-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# Nautilus Trusted Compute MVP
220

321
This repository is organized into several sub-directories containing components of the Nautilus Trusted Compute MVP.
@@ -14,13 +32,36 @@ This repository is organized into several sub-directories containing components
1432
### Execution Service & Enclave (/SGX-MVP)
1533
Secure WASM binary execution environment with data sealing/unsealing capabilities and oracle integration.
1634

17-
### JSON Schema Validator (/json-schema-validator)
18-
JSON validation for ensuring data integrity and structure.
19-
2035
### Smart Contracts (/TBD)
2136
TBD blockchain integration for trusted compute verification and orchestration.
2237

2338
### Oracle Node (/TBD)
2439
Blockchain network validator that validates the state of the blockchain.
2540

26-
For detailed component documentation, implementation details, and setup instructions, please visit our [documentation site](https://ntls-io.github.io/trusted-compute-MVP/).
41+
For detailed component documentation, implementation details, and setup instructions, please visit our [documentation site](https://ntls-io.github.io/trusted-compute-MVP/).
42+
43+
## 🔹 License Compliance & Automation
44+
45+
To ensure all files in the repository include the required license header, we provide a script to **automate license insertion**.
46+
47+
### **Adding License Headers Locally**
48+
Run the following script to **automatically add the Nautilus AGPL license** to all supported files:
49+
50+
```bash
51+
./add-license.sh
52+
```
53+
54+
This will: ✅ Add license headers to all source code files (`.ts`, `.js`, `.py`, `.rs`, etc.)
55+
56+
* Add an HTML comment license block to .md files
57+
* Skip unnecessary directories (node_modules, target, dist, etc.)
58+
59+
### GitHub License Check
60+
61+
We also enforce license compliance via GitHub Actions. On every PR, a CI check will fail if files are missing a license header.
62+
63+
To manually validate changed files before pushing, run:
64+
65+
```bash
66+
git diff --name-only | xargs ./add-license.sh
67+
```

add-license.sh

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/bin/bash
2+
3+
# License File
4+
LICENSE_FILE="license-template.txt"
5+
LICENSE_TEXT="<!--
6+
Nautilus Trusted Compute
7+
Copyright (C) 2025 Nautilus
8+
9+
This program is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU Affero General Public License as published
11+
by the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
This program is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU Affero General Public License for more details.
18+
19+
You should have received a copy of the GNU Affero General Public License
20+
along with this program. If not, see <https://www.gnu.org/licenses/>.
21+
-->"
22+
23+
# Directories to exclude
24+
EXCLUDE_DIRS=("ntc-web/node_modules" "sgx-mvp/target" "dist" "build" "out" "vendor")
25+
26+
# Ensure addlicense is installed
27+
if ! command -v addlicense &> /dev/null; then
28+
echo "❌ addlicense not found! Install it using: go install github.com/google/addlicense@latest"
29+
exit 1
30+
fi
31+
32+
# Ensure the license template exists
33+
if [ ! -f "$LICENSE_FILE" ]; then
34+
echo "❌ License template file not found! Ensure $LICENSE_FILE exists."
35+
exit 1
36+
fi
37+
38+
# Build find command with exclusions
39+
EXCLUDE_ARGS=()
40+
for dir in "${EXCLUDE_DIRS[@]}"; do
41+
EXCLUDE_ARGS+=(-path "./$dir" -prune -o)
42+
done
43+
44+
# Run addlicense for supported file types
45+
echo "🔹 Adding license to source files..."
46+
find . "${EXCLUDE_ARGS[@]}" -type f \( \
47+
-name "*.js" -o \
48+
-name "*.jsx" -o \
49+
-name "*.ts" -o \
50+
-name "*.tsx" -o \
51+
-name "*.py" -o \
52+
-name "*.cpp" -o \
53+
-name "*.c" -o \
54+
-name "*.h" -o \
55+
-name "*.rs" -o \
56+
-name "*.sh" -o \
57+
-name "*.prisma" -o \
58+
-name "*.toml" -o \
59+
-name "*.yml" -o \
60+
-name "*.yaml" -o \
61+
-name "*.css" -o \
62+
-name "*.scss" -o \
63+
-name "*.sass" -o \
64+
-name "*.less" -o \
65+
-name "*.html" -o \
66+
-name "Dockerfile" -o \
67+
-name "*.cargo" \
68+
\) -exec addlicense -f "$LICENSE_FILE" -y 2025 -c "Nautilus" {} +
69+
70+
# Manually handle .md files (add comment block if missing)
71+
echo "🔹 Adding license to Markdown files..."
72+
find . "${EXCLUDE_ARGS[@]}" -type f -name "*.md" | while read -r file; do
73+
if [ -f "$file" ]; then # Ensure it's a file
74+
if ! grep -q "Copyright (C) 2025 Nautilus" "$file"; then
75+
# Create a temporary file to store the license and the original content
76+
printf "%s\n\n" "$LICENSE_TEXT" | cat - "$file" > "$file.tmp" && mv "$file.tmp" "$file"
77+
echo "✅ Added license to $file"
78+
else
79+
echo "✔️ License already present in $file"
80+
fi
81+
fi
82+
done
83+
84+
echo "🎉 License update complete!"

docs/api/endpoints/data-pool.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Data Pool APIs**
220

321
The Data Pool APIs allow you to create and manage data pools within the SGX enclave.

docs/api/endpoints/health.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Health Check API**
220

321
A simple endpoint to verify that the server is running and responsive.

docs/api/endpoints/python-execution.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Python Execution API**
220

321
Execute Python scripts (hosted on GitHub) within the SGX enclave on the secured data pool. The script must be verified using its SHA256 hash before execution.

docs/api/endpoints/wasm-execution.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **WebAssembly Execution API**
220

321
Execute WebAssembly (WASM) binaries (hosted on GitHub) within the SGX enclave on the secured data pool. The binary must be verified using its SHA256 hash before execution. The API also requires the JSON schema.

docs/api/overview.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Overview**
220

321
The Nautilus MVP provides a REST API for interacting with the SGX enclave and performing secure data operations. All endpoints are served over HTTPS and support remote attestation (RA-TLS).

docs/api/postman-collection/usage-guide.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Postman Collection Guide**
220

321
This guide helps you get started with testing the Nautilus MVP APIs using Postman.

docs/attestation/client-setup.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Attestation Client Setup**
220

321
This guide covers the setup and configuration of the attestation client for verifying SGX enclaves.
@@ -93,7 +111,7 @@ make attest
93111

94112
1. **Build Container and Get Signature**
95113

96-
Check [Docker Deployment Guide](installation/docker-deployment.md) for complete instructions on building and setting up the Docker environment.
114+
Check [Docker Deployment Guide](../installation/docker-deployment.md) for complete instructions on building and setting up the Docker environment.
97115

98116
```sh
99117
cd sgx-mvp/docker

docs/attestation/guide.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Remote Attestation Guide**
220

321
This guide explains the Remote Attestation (RA) process in the Nautilus MVP using Intel SGX and Azure DCAP.

docs/index.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Nautilus Documentation**
220

321
Welcome to the documentation for the Nautilus Trusted Compute MVP. This project implements secure data processing using Intel SGX enclaves.

docs/installation/docker-deployment.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--
2+
Nautilus Trusted Compute
3+
Copyright (C) 2025 Nautilus
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU Affero General Public License as published
7+
by the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU Affero General Public License for more details.
14+
15+
You should have received a copy of the GNU Affero General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
-->
18+
119
# **Docker Deployment Guide**
220

321
This guide explains how to build and run the Nautilus SGX MVP using Docker containers.

0 commit comments

Comments
 (0)