SUrvey now works
This commit is contained in:
96
application/controllers/advanced.go
Normal file
96
application/controllers/advanced.go
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
package controllers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"html/template"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"risklet/db"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Advanced(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.Method == "GET" {
|
||||||
|
handleAdvancedGet(w, r)
|
||||||
|
} else if r.Method == "POST" {
|
||||||
|
handleAdvancedPost(w, r)
|
||||||
|
} else {
|
||||||
|
http.Error(w, "Method not allowed.", http.StatusMethodNotAllowed)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func handleAdvancedPost(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if err := r.ParseForm(); err != nil {
|
||||||
|
log.Println("Error processing form: ", err)
|
||||||
|
handleAdvancedGet(w, r)
|
||||||
|
}
|
||||||
|
company := createCompany(r.PostForm)
|
||||||
|
companyId, err := db.InsertCompany(company)
|
||||||
|
if err != nil {
|
||||||
|
log.Println("Error inserting company into database ", err)
|
||||||
|
handleAdvancedGet(w, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
advancedProfile := createAdvancedProfile(companyId, r.PostForm)
|
||||||
|
|
||||||
|
_, err = db.InsertAdvancedProfile(advancedProfile)
|
||||||
|
if err != nil {
|
||||||
|
log.Println("Error inserting into database ", err)
|
||||||
|
handleAdvancedGet(w, r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func handleAdvancedGet(w http.ResponseWriter, r *http.Request) {
|
||||||
|
companyId := r.PathValue("companyId")
|
||||||
|
|
||||||
|
lp := filepath.Join("application", "layouts", "main.html")
|
||||||
|
fp := filepath.Join("application", "views", "advanced.html")
|
||||||
|
|
||||||
|
log.Println("Hitting Advanced")
|
||||||
|
|
||||||
|
// Return a 404 if the template doesn't exist
|
||||||
|
info, err := os.Stat(fp)
|
||||||
|
if err != nil {
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
http.NotFound(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return a 404 if the request is for a directory
|
||||||
|
if info.IsDir() {
|
||||||
|
http.NotFound(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpl, err := template.ParseFiles(lp, fp)
|
||||||
|
if err != nil {
|
||||||
|
// Log the detailed error
|
||||||
|
log.Print(err.Error())
|
||||||
|
// Return a generic "Internal Server Error" message
|
||||||
|
http.Error(w, http.StatusText(500), 500)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err = tmpl.ExecuteTemplate(w, "main.html", companyId)
|
||||||
|
if err != nil {
|
||||||
|
log.Print(err.Error())
|
||||||
|
http.Error(w, http.StatusText(500), 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func createAdvancedProfile(companyId int, f url.Values) db.AdvancedProfile {
|
||||||
|
return db.AdvancedProfile{
|
||||||
|
CompanyId: companyId,
|
||||||
|
GeographicDistribution: f.Get("GeographicDistribution"),
|
||||||
|
CustomerConcentration: f.Get("CustomerConcentration"),
|
||||||
|
ProductServicePortfolio: f.Get("ProductServicePortfolio"),
|
||||||
|
OrganizationalCulture: f.Get("OrganizationalCulture"),
|
||||||
|
SupplierDiversity: f.Get("SupplierDiversity"),
|
||||||
|
TechnologicalInfrastructure: f.Get("TechnologicalInfrastructure"),
|
||||||
|
IntellectualProperty: f.Get("IntellectualProperty"),
|
||||||
|
ManagementTeamExperience: f.Get("ManagementTeamExperience"),
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -41,13 +41,15 @@ func handlePost(w http.ResponseWriter, r *http.Request) {
|
|||||||
handleGet(w, r)
|
handleGet(w, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
http.Redirect(w, r, "/thankyou", http.StatusSeeOther)
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleGet(w http.ResponseWriter, r *http.Request) {
|
func handleGet(w http.ResponseWriter, r *http.Request) {
|
||||||
lp := filepath.Join("application", "layouts", "main.html")
|
lp := filepath.Join("application", "layouts", "main.html")
|
||||||
fp := filepath.Join("application", "views", "signup.html")
|
fp := filepath.Join("application", "views", "signup.html")
|
||||||
|
|
||||||
log.Println("Hitting Signup")
|
// add a CSP header to allow only same-origin scripts
|
||||||
|
w.Header().Set("Content-Security-Policy", "script-src 'unsafe-eval' 'self'")
|
||||||
|
|
||||||
// Return a 404 if the template doesn't exist
|
// Return a 404 if the template doesn't exist
|
||||||
info, err := os.Stat(fp)
|
info, err := os.Stat(fp)
|
||||||
|
|||||||
@@ -4,8 +4,9 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Hello, World!</title>
|
<title>Hello, World!</title>
|
||||||
<!-- Bootstrap CSS -->
|
|
||||||
<link href="/static/css/bootstrap.css" rel="stylesheet">
|
<link href="/static/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="/static/css/Jost.css" rel="stylesheet">
|
||||||
|
<link href="/static/css/main.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav class="navbar navbar-dark bg-dark navbar-expand-lg text-light">
|
<nav class="navbar navbar-dark bg-dark navbar-expand-lg text-light">
|
||||||
@@ -32,8 +33,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
<article class="px-3">
|
||||||
{{block "content" .}} {{end}}
|
{{block "content" .}} {{end}}
|
||||||
<!-- Bootstrap JS and dependencies -->
|
<!-- Bootstrap JS and dependencies -->
|
||||||
|
</article>
|
||||||
<script src="/static/js/bootstrap.js"></script>
|
<script src="/static/js/bootstrap.js"></script>
|
||||||
{{block "bottom" .}} {{end}}
|
{{block "bottom" .}} {{end}}
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -9,5 +9,6 @@ func SetupAppServer() {
|
|||||||
fs := http.FileServer(http.Dir("./application/static"))
|
fs := http.FileServer(http.Dir("./application/static"))
|
||||||
http.Handle("GET /static/", http.StripPrefix("/static/", fs))
|
http.Handle("GET /static/", http.StripPrefix("/static/", fs))
|
||||||
http.HandleFunc("/signup/", controllers.Signup)
|
http.HandleFunc("/signup/", controllers.Signup)
|
||||||
|
http.HandleFunc("/advanced/{companyString}", controllers.Advanced)
|
||||||
http.HandleFunc("/", controllers.Index)
|
http.HandleFunc("/", controllers.Index)
|
||||||
}
|
}
|
||||||
|
|||||||
4
application/static/css/main.css
Normal file
4
application/static/css/main.css
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Jost', sans-serif;
|
||||||
|
}
|
||||||
164
application/static/js/formHandling.js
Normal file
164
application/static/js/formHandling.js
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
|
const form = document.querySelector('form');
|
||||||
|
const formElements = form.elements;
|
||||||
|
|
||||||
|
// Load saved form state
|
||||||
|
/* loadFormState(formElements);
|
||||||
|
|
||||||
|
// Save form state on change
|
||||||
|
form.addEventListener('change', () => {
|
||||||
|
saveFormState(formElements);
|
||||||
|
}); */
|
||||||
|
|
||||||
|
setUpNavigation()
|
||||||
|
});
|
||||||
|
|
||||||
|
function nextQuestion() {
|
||||||
|
document.currentQuestion++;
|
||||||
|
hideNavElementsAndQuestions();
|
||||||
|
showQuestion(`q${document.currentQuestion}`);
|
||||||
|
setButtonVisiblity('back', true);
|
||||||
|
setButtonVisiblity('next', true);
|
||||||
|
if (document.currentQuestion === document.lastQuestion) {
|
||||||
|
setButtonVisiblity('next', false);
|
||||||
|
setButtonVisiblity('submit', true);
|
||||||
|
}
|
||||||
|
setNextButtonAvailability();
|
||||||
|
}
|
||||||
|
|
||||||
|
function previousQuestion() {
|
||||||
|
if (document.currentQuestion > 0) {
|
||||||
|
document.currentQuestion--;
|
||||||
|
hideNavElementsAndQuestions();
|
||||||
|
showQuestion(`q${document.currentQuestion}`);
|
||||||
|
setButtonVisiblity('next', true);
|
||||||
|
setButtonVisiblity('submit', false);
|
||||||
|
document.nextEnabled = true;
|
||||||
|
}
|
||||||
|
setButtonVisiblity('back', document.currentQuestion !== 0);
|
||||||
|
setNextButtonAvailability();
|
||||||
|
}
|
||||||
|
|
||||||
|
function setUpNavigation() {
|
||||||
|
const questions = document.querySelectorAll('.question');
|
||||||
|
|
||||||
|
document.currentQuestion = 0;
|
||||||
|
document.nextEnabled = false;
|
||||||
|
document.lastQuestion = questions.length - 1;
|
||||||
|
|
||||||
|
hideNavElementsAndQuestions();
|
||||||
|
showQuestion(`q${document.currentQuestion}`);
|
||||||
|
setButtonVisiblity('next', true);
|
||||||
|
|
||||||
|
|
||||||
|
const nextButton = document.getElementById('next');
|
||||||
|
const backButton = document.getElementById('back');
|
||||||
|
nextButton.addEventListener('click', nextQuestion);
|
||||||
|
backButton.addEventListener('click', previousQuestion);
|
||||||
|
|
||||||
|
setNextButtonAvailability();
|
||||||
|
|
||||||
|
// check if next button should be enabled on every input, checkbox and radio button bellow class of .question change
|
||||||
|
const inputs = document.querySelectorAll('.question input, .question select, .question textarea');
|
||||||
|
inputs.forEach(input => {
|
||||||
|
input.addEventListener('change', setNextButtonAvailability);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function setNextButtonAvailability() {
|
||||||
|
console.log('Setting next button availability');
|
||||||
|
// check if current question is answered
|
||||||
|
// and then enable the next button, disable it otherwise
|
||||||
|
const currentQuestion = document.getElementById(`q${document.currentQuestion}`);
|
||||||
|
const nextButton = document.getElementById('next');
|
||||||
|
const submitButton = document.getElementById('submit');
|
||||||
|
// check if any input in the current question is checked, or filled in case it is a text input
|
||||||
|
let nextEnabled = false;
|
||||||
|
const inputs = currentQuestion.querySelectorAll('input, select, textarea');
|
||||||
|
for (let input of inputs) {
|
||||||
|
// if the input is not visible, skip it
|
||||||
|
if (input.checkVisibility() === false) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (input.type === 'checkbox' || input.type === 'radio') {
|
||||||
|
if (input.checked) {
|
||||||
|
nextEnabled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (input.value) {
|
||||||
|
nextEnabled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nextButton.disabled = !nextEnabled;
|
||||||
|
submitButton.disabled = !nextEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveFormState(elements) {
|
||||||
|
const formState = {};
|
||||||
|
for (let element of elements) {
|
||||||
|
if (element.name) {
|
||||||
|
if (element.type === 'select-multiple') {
|
||||||
|
formState[element.name] = Array.from(element.selectedOptions).map(option => option.value);
|
||||||
|
} else if (element.type === 'checkbox' || element.type === 'radio') {
|
||||||
|
formState[element.name] = element.checked ? element.value : formState[element.name] || null;
|
||||||
|
} else {
|
||||||
|
formState[element.name] = element.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
localStorage.setItem('formState', JSON.stringify(formState));
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadFormState(elements) {
|
||||||
|
const formState = JSON.parse(localStorage.getItem('formState'));
|
||||||
|
if (formState) {
|
||||||
|
for (let element of elements) {
|
||||||
|
if (element.name && formState[element.name] !== undefined) {
|
||||||
|
if (element.type === 'select-multiple') {
|
||||||
|
Array.from(element.options).forEach(option => {
|
||||||
|
option.selected = formState[element.name].includes(option.value);
|
||||||
|
});
|
||||||
|
} else if (element.type === 'checkbox' || element.type === 'radio') {
|
||||||
|
element.checked = formState[element.name] === element.value;
|
||||||
|
} else {
|
||||||
|
element.value = formState[element.name];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideNavElementsAndQuestions() {
|
||||||
|
const questions = document.querySelectorAll('.question');
|
||||||
|
questions.forEach(question => {
|
||||||
|
// add bootstrap hidden class to the element
|
||||||
|
question.classList.add('d-none');
|
||||||
|
});
|
||||||
|
const nextButton = document.getElementById('next');
|
||||||
|
const backButton = document.getElementById('back');
|
||||||
|
const submitButton = document.getElementById('submit');
|
||||||
|
nextButton.classList.add('d-none');
|
||||||
|
backButton.classList.add('d-none');
|
||||||
|
submitButton.classList.add('d-none');
|
||||||
|
}
|
||||||
|
|
||||||
|
function showQuestion(questionId) {
|
||||||
|
const question = document.getElementById(questionId);
|
||||||
|
question.classList.remove('d-none');
|
||||||
|
}
|
||||||
|
|
||||||
|
function setButtonVisiblity(buttonId, visible) {
|
||||||
|
const button = document.getElementById(buttonId);
|
||||||
|
if (visible) {
|
||||||
|
button.classList.remove('d-none');
|
||||||
|
} else {
|
||||||
|
button.classList.add('d-none');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
document.addEventListener('DOMContentLoaded', (event) => {
|
|
||||||
const form = document.querySelector('form');
|
|
||||||
const formElements = form.elements;
|
|
||||||
|
|
||||||
// Load saved form state
|
|
||||||
loadFormState(formElements);
|
|
||||||
|
|
||||||
// Save form state on change
|
|
||||||
form.addEventListener('change', () => {
|
|
||||||
saveFormState(formElements);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function saveFormState(elements) {
|
|
||||||
const formState = {};
|
|
||||||
for (let element of elements) {
|
|
||||||
if (element.name) {
|
|
||||||
if (element.type === 'select-multiple') {
|
|
||||||
formState[element.name] = Array.from(element.selectedOptions).map(option => option.value);
|
|
||||||
} else {
|
|
||||||
formState[element.name] = element.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
localStorage.setItem('formState', JSON.stringify(formState));
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadFormState(elements) {
|
|
||||||
const formState = JSON.parse(localStorage.getItem('formState'));
|
|
||||||
if (formState) {
|
|
||||||
for (let element of elements) {
|
|
||||||
if (element.name && formState[element.name]) {
|
|
||||||
if (element.type === 'select-multiple') {
|
|
||||||
Array.from(element.options).forEach(option => {
|
|
||||||
option.selected = formState[element.name].includes(option.value);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
element.value = formState[element.name];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
198
application/views/advanced.html
Normal file
198
application/views/advanced.html
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
{{define "content"}}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h1 class="pt-4 mt-5 mb-4">Advanced Risk Assessment</h1>
|
||||||
|
<hr>
|
||||||
|
<form method="post">
|
||||||
|
<!-- Geographic Operational Scope -->
|
||||||
|
<div class="mb-3 question" id="q1">
|
||||||
|
<label for="geo-scope" class="form-label mt-3">What is your organization's geographic operational scope?</label>
|
||||||
|
<hr>
|
||||||
|
<select class="form-select" id="geo-scope" name="GeoScope" required>
|
||||||
|
<option value="single-country">Single country</option>
|
||||||
|
<option value="single-region">Multiple countries - Single region</option>
|
||||||
|
<option value="multiple-regions">Multiple countries - Multiple regions</option>
|
||||||
|
<option value="global">Global operations</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-text text-muted py-3">Determines exposure to different cybersecurity regulations.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Customer Base Distribution -->
|
||||||
|
<div class="mb-3 question" id="q2">
|
||||||
|
<label for="customer-base" class="form-label mt-3">How would you characterize your customer base distribution?</label>
|
||||||
|
<hr>
|
||||||
|
<select class="form-select" id="customer-base" name="CustomerBase" required>
|
||||||
|
<option value="few-key">Few key clients (1-5)</option>
|
||||||
|
<option value="moderate">Moderate concentration (6-20)</option>
|
||||||
|
<option value="diverse">Diverse customer base (20+)</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-text text-muted py-3">Assesses potential impact of data breaches.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Primary Customer Type -->
|
||||||
|
<div class="mb-3 question" id="q3">
|
||||||
|
<label for="customer-type" class="form-label mt-3">What is your primary customer type?</label>
|
||||||
|
<hr>
|
||||||
|
<select class="form-select" id="customer-type" name="CustomerType" required>
|
||||||
|
<option value="b2b">Primarily B2B</option>
|
||||||
|
<option value="b2c">Primarily B2C</option>
|
||||||
|
<option value="mixed">Mixed B2B/B2C</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-text text-muted py-3">Defines data protection requirements.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Product/Service Portfolio -->
|
||||||
|
<div class="mb-3 question" id="q4">
|
||||||
|
<label for="product-portfolio" class="form-label mt-3">How diversified is your product/service portfolio?</label>
|
||||||
|
<hr>
|
||||||
|
<select class="form-select" id="product-portfolio" name="ProductPortfolio" required>
|
||||||
|
<option value="single">Single product/service</option>
|
||||||
|
<option value="2-5">2-5 products/services</option>
|
||||||
|
<option value="more-than-5">More than 5 products/services</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-text text-muted py-3">Indicates the variety of systems requiring protection.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Supplier Base Structure -->
|
||||||
|
<div class="mb-3 question" id="q5">
|
||||||
|
<label for="supplier-base" class="form-label mt-3">What is your supplier base structure?</label>
|
||||||
|
<hr>
|
||||||
|
<select class="form-select" id="supplier-base" name="SupplierBase" required>
|
||||||
|
<option value="single-critical">Single/few critical suppliers</option>
|
||||||
|
<option value="moderate">Moderate supplier base</option>
|
||||||
|
<option value="highly-diverse">Highly diverse supplier base</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-text text-muted py-3">Assesses third-party cybersecurity risks.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- IT Infrastructure Model -->
|
||||||
|
<div class="mb-3 question" id="q6">
|
||||||
|
<label class="form-label mt-3">What is your primary IT infrastructure model?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-on-prem" value="on-premises">
|
||||||
|
<label class="form-check-label" for="it-on-prem">On-premises systems</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-cloud" value="cloud-based">
|
||||||
|
<label class="form-check-label" for="it-cloud">Cloud-based systems</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-hybrid" value="hybrid">
|
||||||
|
<label class="form-check-label" for="it-hybrid">Hybrid infrastructure</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-legacy" value="legacy">
|
||||||
|
<label class="form-check-label" for="it-legacy">Legacy systems</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-modern" value="modern">
|
||||||
|
<label class="form-check-label" for="it-modern">Modern architecture</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Determines specific cybersecurity controls.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Intellectual Property Protection -->
|
||||||
|
<div class="mb-3 question" id="q7">
|
||||||
|
<label class="form-label mt-3">How does your organization protect and manage intellectual property?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-patents" value="patents">
|
||||||
|
<label class="form-check-label" for="ip-patents">Patents owned</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-licensed" value="licensed-ip">
|
||||||
|
<label class="form-check-label" for="ip-licensed">Licensed IP from others</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-trade-secrets" value="trade-secrets">
|
||||||
|
<label class="form-check-label" for="ip-trade-secrets">Trade secrets</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-joint" value="joint-ip">
|
||||||
|
<label class="form-check-label" for="ip-joint">Joint IP ownership</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-none" value="no-ip">
|
||||||
|
<label class="form-check-label" for="ip-none">No significant IP</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Evaluates cybersecurity needs based on IP ownership.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sensitive Data -->
|
||||||
|
<div class="mb-3 question" id="q8">
|
||||||
|
<label class="form-label mt-3">What type of sensitive data does your organization handle?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-personal" value="personal">
|
||||||
|
<label class="form-check-label" for="data-personal">Personal customer data</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-financial" value="financial">
|
||||||
|
<label class="form-check-label" for="data-financial">Financial records</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-healthcare" value="healthcare">
|
||||||
|
<label class="form-check-label" for="data-healthcare">Healthcare information</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-ip" value="ip">
|
||||||
|
<label class="form-check-label" for="data-ip">Intellectual property</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-gov" value="government">
|
||||||
|
<label class="form-check-label" for="data-gov">Government data</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-payment" value="payment">
|
||||||
|
<label class="form-check-label" for="data-payment">Payment card data</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Identifies required compliance frameworks.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Critical Business Systems -->
|
||||||
|
<div class="mb-3 question" id="q9">
|
||||||
|
<label for="integration-level" class="form-label mt-3">How integrated are your critical business systems?</label>
|
||||||
|
<hr>
|
||||||
|
<select class="form-select" id="integration-level" name="IntegrationLevel" required>
|
||||||
|
<option value="fully-integrated">Fully integrated</option>
|
||||||
|
<option value="partially-integrated">Partially integrated</option>
|
||||||
|
<option value="mostly-separate">Mostly separate</option>
|
||||||
|
<option value="completely-isolated">Completely isolated</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-text text-muted py-3">Evaluates potential for cascade failures.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Remote Work Policy -->
|
||||||
|
<div class="mb-3 question" id="q10">
|
||||||
|
<label for="remote-policy" class="form-label mt-3">What is your organization's remote work policy?</label>
|
||||||
|
<hr>
|
||||||
|
<select class="form-select" id="remote-policy" name="RemotePolicy" required>
|
||||||
|
<option value="no-remote">No remote work allowed</option>
|
||||||
|
<option value="limited-remote">Limited remote work options</option>
|
||||||
|
<option value="hybrid">Hybrid work model</option>
|
||||||
|
<option value="fully-remote">Fully remote operations available</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-text text-muted py-3">Determines the scope of remote access security requirements.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-end mt-4">
|
||||||
|
<button type="button" class="btn btn-lg btn-outline-secondary me-3" id="back">Back</button>
|
||||||
|
<button type="submit" class="btn btn-primary btn-lg" id="submit">Next</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{define "bottom"}}
|
||||||
|
<script src="/static/js/formHandling.js"></script>
|
||||||
|
{{end}}
|
||||||
@@ -2,74 +2,180 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h1 class="mt-5 mb-3">Sign Up</h1>
|
<h1 class="pt-4 mt-5 mb-4">Risk Assessment Questions</h1>
|
||||||
|
<hr>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<div class="mb-3">
|
<!-- Organization Name -->
|
||||||
<label for="name" class="form-label">Organization Name</label>
|
<div class="mb-3 question" id="q0">
|
||||||
|
<label for="name" class="form-label mt-3">What is the name of your organization?</label>
|
||||||
|
<hr>
|
||||||
<input type="text" class="form-control" id="name" name="Name" required>
|
<input type="text" class="form-control" id="name" name="Name" required>
|
||||||
<small class="form-text text-muted">Name of the Organization that will appear in the report.</small>
|
<small class="form-text text-muted py-3">Name of the Organization that will appear in the
|
||||||
|
report.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
|
||||||
<label for="email" class="form-label">Email</label>
|
<!-- Email -->
|
||||||
|
<div class="mb-3 question" id="q1">
|
||||||
|
<label for="email" class="form-label mt-3">What is your email?</label>
|
||||||
|
<hr>
|
||||||
<input type="email" class="form-control" id="email" name="Email" required>
|
<input type="email" class="form-control" id="email" name="Email" required>
|
||||||
<small class="form-text text-muted">Email of the person responsible for using Risklet. Report and magic link for log in will be sent to this email. </small>
|
<small class="form-text text-muted py-3">Email of the person responsible for using Risklet. Report
|
||||||
|
and
|
||||||
|
magic link for login will be sent to this email.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Employee Headcount -->
|
<!-- Employee Headcount -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q2">
|
||||||
<label for="employees" class="form-label">What is your organization's current employee headcount?</label>
|
<label class="form-label mt-3">What is your organization's current employee headcount?</label>
|
||||||
<select class="form-select" id="employees" name="Employees" required>
|
<hr>
|
||||||
<option value="1-10">1-10</option>
|
<div>
|
||||||
<option value="11-100">11-100</option>
|
<div class="form-check">
|
||||||
<option value="101-10000">101-10,000</option>
|
<input class="form-check-input" type="radio" name="Employees" id="employees-1-10"
|
||||||
<option value="10001-">10,001+</option>
|
value="1-10" required>
|
||||||
</select>
|
<label class="form-check-label" for="employees-1-10">1-10</label>
|
||||||
<small class="form-text text-muted">Helps determine the scale of IT infrastructure and security needs based on user volume.</small>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Employees" id="employees-11-100"
|
||||||
|
value="11-100">
|
||||||
|
<label class="form-check-label" for="employees-11-100">11-100</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Employees" id="employees-101-10000"
|
||||||
|
value="101-10000">
|
||||||
|
<label class="form-check-label" for="employees-101-10000">101-10,000</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Employees" id="employees-10001"
|
||||||
|
value="10001-">
|
||||||
|
<label class="form-check-label" for="employees-10001">10,001+</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Helps determine the scale of IT infrastructure and security
|
||||||
|
needs based on user volume.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Annual Revenue -->
|
<!-- Annual Revenue -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q3">
|
||||||
<label for="revenue" class="form-label">What is your organization's annual revenue range?</label>
|
<label class="form-label mt-3">What is your organization's annual revenue range?</label>
|
||||||
<select class="form-select" id="revenue" name="Revenue" required>
|
<hr>
|
||||||
<option value="under-1m">$ under 1M</option>
|
<div>
|
||||||
<option value="1m-100m">$ 1M-100M</option>
|
<div class="form-check">
|
||||||
<option value="100m-1b">$ 100M-1B</option>
|
<input class="form-check-input" type="radio" name="Revenue" id="revenue-under-1m"
|
||||||
<option value="above-1b">$ Above 1B</option>
|
value="under-1m" required>
|
||||||
</select>
|
<label class="form-check-label" for="revenue-under-1m">$ under 1M</label>
|
||||||
<small class="form-text text-muted">Indicates available resources for cybersecurity investments and helps assess risk appetite.</small>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Revenue" id="revenue-1m-100m"
|
||||||
|
value="1m-100m">
|
||||||
|
<label class="form-check-label" for="revenue-1m-100m">$ 1M-100M</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Revenue" id="revenue-100m-1b"
|
||||||
|
value="100m-1b">
|
||||||
|
<label class="form-check-label" for="revenue-100m-1b">$ 100M-1B</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Revenue" id="revenue-above-1b"
|
||||||
|
value="above-1b">
|
||||||
|
<label class="form-check-label" for="revenue-above-1b">$ Above 1B</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Indicates available resources for cybersecurity investments
|
||||||
|
and
|
||||||
|
helps assess risk appetite.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Critical Business Applications -->
|
<!-- Critical Business Applications -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q4">
|
||||||
<label for="business-apps" class="form-label">How many critical business applications do your employees use daily?</label>
|
<label class="form-label mt-3">How many critical business applications do your employees use
|
||||||
<select class="form-select" id="business-apps" name="Applications" required>
|
daily?</label>
|
||||||
<option value="1-5">1-5</option>
|
<hr>
|
||||||
<option value="5-20">5-20</option>
|
<div>
|
||||||
<option value="more-than-20">More than 20</option>
|
<div class="form-check">
|
||||||
<option value="unknown">I don't know</option>
|
<input class="form-check-input" type="radio" name="Applications" id="apps-1-5" value="1-5"
|
||||||
</select>
|
required>
|
||||||
<small class="form-text text-muted">Reveals the complexity of your technology landscape and potential attack surface.</small>
|
<label class="form-check-label" for="apps-1-5">1-5</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Applications" id="apps-5-20"
|
||||||
|
value="5-20">
|
||||||
|
<label class="form-check-label" for="apps-5-20">5-20</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Applications" id="apps-more-than-20"
|
||||||
|
value="more-than-20">
|
||||||
|
<label class="form-check-label" for="apps-more-than-20">More than 20</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="Applications" id="apps-unknown"
|
||||||
|
value="unknown">
|
||||||
|
<label class="form-check-label" for="apps-unknown">I don't know</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Reveals the complexity of your technology landscape and
|
||||||
|
potential attack surface.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Regulatory Frameworks -->
|
<!-- Regulatory Frameworks -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q5">
|
||||||
<label for="compliance" class="form-label">Which regulatory frameworks is your organization required to comply with?</label>
|
<label class="form-label mt-3">Which regulatory frameworks is your organization required to comply
|
||||||
<select class="form-select" id="compliance" name="Compliance" multiple required>
|
with?</label>
|
||||||
<option value="gdpr">GDPR</option>
|
<hr>
|
||||||
<option value="hipaa">HIPAA</option>
|
<div>
|
||||||
<option value="pci-dss">PCI DSS</option>
|
<div class="form-check">
|
||||||
<option value="sox">SOX</option>
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-gdpr"
|
||||||
<option value="iso-27001">ISO 27001</option>
|
value="gdpr">
|
||||||
<option value="ccpa">CCPA</option>
|
<label class="form-check-label" for="compliance-gdpr">GDPR</label>
|
||||||
<option value="nist">NIST</option>
|
</div>
|
||||||
<option value="other">Other</option>
|
<div class="form-check">
|
||||||
<option value="unknown">I don't know</option>
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-hipaa"
|
||||||
</select>
|
value="hipaa">
|
||||||
<small class="form-text text-muted">Identifies mandatory security controls and compliance requirements that must be implemented.</small>
|
<label class="form-check-label" for="compliance-hipaa">HIPAA</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-pci-dss"
|
||||||
|
value="pci-dss">
|
||||||
|
<label class="form-check-label" for="compliance-pci-dss">PCI DSS</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-sox"
|
||||||
|
value="sox">
|
||||||
|
<label class="form-check-label" for="compliance-sox">SOX</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-iso-27001"
|
||||||
|
value="iso-27001">
|
||||||
|
<label class="form-check-label" for="compliance-iso-27001">ISO 27001</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-ccpa"
|
||||||
|
value="ccpa">
|
||||||
|
<label class="form-check-label" for="compliance-ccpa">CCPA</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-nist"
|
||||||
|
value="nist">
|
||||||
|
<label class="form-check-label" for="compliance-nist">NIST</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-other"
|
||||||
|
value="other">
|
||||||
|
<label class="form-check-label" for="compliance-other">Other</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="Compliance" id="compliance-unknown"
|
||||||
|
value="unknown">
|
||||||
|
<label class="form-check-label" for="compliance-unknown">I don't know</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Identifies mandatory security controls and compliance
|
||||||
|
requirements that must be implemented.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Industry Sector -->
|
<!-- Industry Sector -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q6">
|
||||||
<label for="industry" class="form-label">What is your primary industry sector?</label>
|
<label for="industry" class="form-label mt-3">What is your primary industry sector?</label>
|
||||||
|
<hr>
|
||||||
<select class="form-select" id="industry" name="Industry" required>
|
<select class="form-select" id="industry" name="Industry" required>
|
||||||
<option value="agriculture">Agriculture, food and forestry</option>
|
<option value="agriculture">Agriculture, food and forestry</option>
|
||||||
<option value="energy">Energy and mining</option>
|
<option value="energy">Energy and mining</option>
|
||||||
@@ -92,85 +198,505 @@
|
|||||||
<option value="public-service">Public service</option>
|
<option value="public-service">Public service</option>
|
||||||
<option value="utilities">Utilities (water; gas; electricity)</option>
|
<option value="utilities">Utilities (water; gas; electricity)</option>
|
||||||
<option value="shipping">Shipping; ports; fisheries; inland waterways</option>
|
<option value="shipping">Shipping; ports; fisheries; inland waterways</option>
|
||||||
<option value="transport">Transport (including civil aviation; railways; road transport)</option>
|
<option value="transport">Transport (including civil aviation; railways; road transport)
|
||||||
|
</option>
|
||||||
<option value="unknown">I don't know</option>
|
<option value="unknown">I don't know</option>
|
||||||
</select>
|
</select>
|
||||||
<small class="form-text text-muted">Determines industry-specific threats, regulations, and security best practices applicable to your business.</small>
|
<small class="form-text text-muted py-3">Determines industry-specific threats, regulations, and
|
||||||
|
security
|
||||||
|
best practices applicable to your business.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- IT Dependency -->
|
<!-- IT Dependency -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q7">
|
||||||
<label for="it-dependency" class="form-label">On a scale from 1-10, how dependent is your business operations on technology?</label>
|
<label for="it-dependency" class="form-label mt-3">On a scale from 1-10, how dependent is your
|
||||||
<input type="range" class="form-range" id="it-dependency" name="ITDependency" min="1" max="10" required>
|
business
|
||||||
|
operations on technology?</label>
|
||||||
|
<hr>
|
||||||
|
<input type="range" class="form-range" id="it-dependency" name="ITDependency" min="1" max="10"
|
||||||
|
required>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<span>Not dependent at all</span>
|
<span>Not dependent at all</span>
|
||||||
<span>Heavily dependent</span>
|
<span>Heavily dependent</span>
|
||||||
</div>
|
</div>
|
||||||
<small class="form-text text-muted">Measures the potential business impact of IT disruptions and helps prioritize security investments.</small>
|
<small class="form-text text-muted py-3">Measures the potential business impact of IT disruptions
|
||||||
|
and
|
||||||
|
helps prioritize security investments.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Sensitive Data Level -->
|
<!-- Sensitive Data Level -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q8">
|
||||||
<label for="data-sensitivity" class="form-label">What level of sensitive data does your organization process?</label>
|
<label class="form-label mt-3">What level of sensitive data does your organization process?</label>
|
||||||
<select class="form-select" id="data-sensitivity" name="DataSensitivity" required>
|
<hr>
|
||||||
<option value="public">Public</option>
|
<div>
|
||||||
<option value="internal">Internal</option>
|
<div class="form-check">
|
||||||
<option value="sensitive">Sensitive</option>
|
<input class="form-check-input" type="radio" name="DataSensitivity" id="data-public"
|
||||||
<option value="confidential">Confidential</option>
|
value="public" required>
|
||||||
<option value="unknown">I don't know</option>
|
<label class="form-check-label" for="data-public">Public</label>
|
||||||
</select>
|
</div>
|
||||||
<small class="form-text text-muted">Assesses the potential impact of data breaches and determines required security controls.</small>
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="DataSensitivity" id="data-internal"
|
||||||
|
value="internal">
|
||||||
|
<label class="form-check-label" for="data-internal">Internal</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="DataSensitivity" id="data-sensitive"
|
||||||
|
value="sensitive">
|
||||||
|
<label class="form-check-label" for="data-sensitive">Sensitive</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="DataSensitivity" id="data-confidential"
|
||||||
|
value="confidential">
|
||||||
|
<label class="form-check-label" for="data-confidential">Confidential</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="DataSensitivity" id="data-unknown"
|
||||||
|
value="unknown">
|
||||||
|
<label class="form-check-label" for="data-unknown">I don't know</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Assesses the potential impact of data breaches and
|
||||||
|
determines
|
||||||
|
required security controls.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Network Infrastructure Model -->
|
<!-- Network Infrastructure Model -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q9">
|
||||||
<label for="network-architecture" class="form-label">What best describes your organization's network infrastructure model?</label>
|
<label class="form-label mt-3">What best describes your organization's network infrastructure
|
||||||
<select class="form-select" id="network-architecture" name="NetworkSegmentation" required>
|
model?</label>
|
||||||
<option value="flat">Flat network</option>
|
<hr>
|
||||||
<option value="some-segmentation">Some segmentation</option>
|
<div>
|
||||||
<option value="segmented">Segmented network</option>
|
<div class="form-check">
|
||||||
<option value="unknown">I don't know</option>
|
<input class="form-check-input" type="radio" name="NetworkSegmentation" id="network-flat"
|
||||||
</select>
|
value="flat" required>
|
||||||
<small class="form-text text-muted">Helps understand the complexity and vulnerability points in your technical environment.</small>
|
<label class="form-check-label" for="network-flat">Flat network</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="NetworkSegmentation" id="network-some"
|
||||||
|
value="some-segmentation">
|
||||||
|
<label class="form-check-label" for="network-some">Some segmentation</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="NetworkSegmentation"
|
||||||
|
id="network-segmented" value="segmented">
|
||||||
|
<label class="form-check-label" for="network-segmented">Segmented network</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="NetworkSegmentation" id="network-unknown"
|
||||||
|
value="unknown">
|
||||||
|
<label class="form-check-label" for="network-unknown">I don't know</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Helps understand the complexity and vulnerability points in
|
||||||
|
your
|
||||||
|
technical environment.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Remote Workforce Percentage -->
|
<!-- Remote Workforce Percentage -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q10">
|
||||||
<label for="remote-work" class="form-label">What percentage of your workforce operates remotely?</label>
|
<label class="form-label mt-3">What percentage of your workforce operates remotely?</label>
|
||||||
<select class="form-select" id="remote-work" name="RemoteWork" required>
|
<hr>
|
||||||
<option value="none">None</option>
|
<div>
|
||||||
<option value="1-10">1-10%</option>
|
<div class="form-check">
|
||||||
<option value="above-10">Above 10%</option>
|
<input class="form-check-input" type="radio" name="RemoteWork" id="remote-none" value="none"
|
||||||
<option value="unknown">I don't know</option>
|
required>
|
||||||
</select>
|
<label class="form-check-label" for="remote-none">None</label>
|
||||||
<small class="form-text text-muted">Evaluates remote access security requirements and potential exposure to external threats.</small>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="RemoteWork" id="remote-1-10"
|
||||||
|
value="1-10">
|
||||||
|
<label class="form-check-label" for="remote-1-10">1-10%</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="RemoteWork" id="remote-above-10"
|
||||||
|
value="above-10">
|
||||||
|
<label class="form-check-label" for="remote-above-10">Above 10%</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="RemoteWork" id="remote-unknown"
|
||||||
|
value="unknown">
|
||||||
|
<label class="form-check-label" for="remote-unknown">I don't know</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Evaluates remote access security requirements and potential
|
||||||
|
exposure to external threats.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Third-Party Vendor Access -->
|
<!-- Third-Party Vendor Access -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q11">
|
||||||
<label for="third-party" class="form-label">How many third-party vendors have access to your systems?</label>
|
<label class="form-label mt-3">How many third-party vendors have access to your systems?</label>
|
||||||
<select class="form-select" id="third-party" name="VendorAccess" required>
|
<hr>
|
||||||
<option value="none">None</option>
|
<div>
|
||||||
<option value="1-5">1-5</option>
|
<div class="form-check">
|
||||||
<option value="more-than-5">More than 5</option>
|
<input class="form-check-input" type="radio" name="VendorAccess" id="vendor-none"
|
||||||
<option value="unknown">I don't know</option>
|
value="none" required>
|
||||||
</select>
|
<label class="form-check-label" for="vendor-none">None</label>
|
||||||
<small class="form-text text-muted">Assesses supply chain risk and the need for vendor security management.</small>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="VendorAccess" id="vendor-1-5"
|
||||||
|
value="1-5">
|
||||||
|
<label class="form-check-label" for="vendor-1-5">1-5</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="VendorAccess" id="vendor-more-than-5"
|
||||||
|
value="more-than-5">
|
||||||
|
<label class="form-check-label" for="vendor-more-than-5">More than 5</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="VendorAccess" id="vendor-unknown"
|
||||||
|
value="unknown">
|
||||||
|
<label class="form-check-label" for="vendor-unknown">I don't know</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Assesses supply chain risk and the need for vendor security
|
||||||
|
management.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Internal Software Development -->
|
<!-- Internal Software Development -->
|
||||||
<div class="mb-3">
|
<div class="mb-3 question" id="q12">
|
||||||
<label for="internal-dev" class="form-label">What is the extent of your internal software development activities?</label>
|
<label class="form-label mt-3">What is the extent of your internal software development
|
||||||
<select class="form-select" id="internal-dev" name="InternalDev" required>
|
activities?</label>
|
||||||
<option value="none">None</option>
|
<hr>
|
||||||
<option value="some">Some internal software development</option>
|
<div>
|
||||||
<option value="significant">Significant internal software development</option>
|
<div class="form-check">
|
||||||
<option value="unknown">I don't know</option>
|
<input class="form-check-input" type="radio" name="InternalDev" id="dev-none" value="none"
|
||||||
</select>
|
required>
|
||||||
<small class="form-text text-muted">Determines the need for secure development practices and application security measures.</small>
|
<label class="form-check-label" for="dev-none">None</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="InternalDev" id="dev-some" value="some">
|
||||||
|
<label class="form-check-label" for="dev-some">Some internal software development</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="InternalDev" id="dev-significant"
|
||||||
|
value="significant">
|
||||||
|
<label class="form-check-label" for="dev-significant">Significant internal software
|
||||||
|
development</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="InternalDev" id="dev-unknown"
|
||||||
|
value="unknown">
|
||||||
|
<label class="form-check-label" for="dev-unknown">I don't know</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Determines the need for secure development practices and
|
||||||
|
application security measures.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Sign Up</button>
|
|
||||||
|
<!-- skip rest if needed -->
|
||||||
|
|
||||||
|
<!-- Geographic Operational Scope -->
|
||||||
|
<div class="mb-3 question" id="q13">
|
||||||
|
<label class="form-label mt-3">What is your organization's geographic operational scope?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="GeoScope" id="geo-single-country"
|
||||||
|
value="single-country" required>
|
||||||
|
<label class="form-check-label" for="geo-single-country">Single country</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="GeoScope" id="geo-single-region"
|
||||||
|
value="single-region">
|
||||||
|
<label class="form-check-label" for="geo-single-region">Multiple countries - Single
|
||||||
|
region</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="GeoScope" id="geo-multiple-regions"
|
||||||
|
value="multiple-regions">
|
||||||
|
<label class="form-check-label" for="geo-multiple-regions">Multiple countries - Multiple
|
||||||
|
regions</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="GeoScope" id="geo-global" value="global">
|
||||||
|
<label class="form-check-label" for="geo-global">Global operations</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Determines exposure to different cybersecurity
|
||||||
|
regulations.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="mb-3 question" id="q14">
|
||||||
|
<label class="form-label mt-3">How would you characterize your customer base distribution?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="CustomerBase" id="customer-few-key"
|
||||||
|
value="few-key" required>
|
||||||
|
<label class="form-check-label" for="customer-few-key">Few key clients (1-5)</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="CustomerBase" id="customer-moderate"
|
||||||
|
value="moderate">
|
||||||
|
<label class="form-check-label" for="customer-moderate">Moderate concentration
|
||||||
|
(6-20)</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="CustomerBase" id="customer-diverse"
|
||||||
|
value="diverse">
|
||||||
|
<label class="form-check-label" for="customer-diverse">Diverse customer base (20+)</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Assesses potential impact of data breaches.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Primary Customer Type -->
|
||||||
|
<div class="mb-3 question" id="q15">
|
||||||
|
<label class="form-label mt-3">What is your primary customer type?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="CustomerType" id="customer-b2b"
|
||||||
|
value="b2b" required>
|
||||||
|
<label class="form-check-label" for="customer-b2b">Primarily B2B</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="CustomerType" id="customer-b2c"
|
||||||
|
value="b2c">
|
||||||
|
<label class="form-check-label" for="customer-b2c">Primarily B2C</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="CustomerType" id="customer-mixed"
|
||||||
|
value="mixed">
|
||||||
|
<label class="form-check-label" for="customer-mixed">Mixed B2B/B2C</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Defines data protection requirements.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Product/Service Portfolio -->
|
||||||
|
<div class="mb-3 question" id="q16">
|
||||||
|
<label class="form-label mt-3">How diversified is your product/service portfolio?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="ProductPortfolio" id="portfolio-single"
|
||||||
|
value="single" required>
|
||||||
|
<label class="form-check-label" for="portfolio-single">Single product/service</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="ProductPortfolio" id="portfolio-2-5"
|
||||||
|
value="2-5">
|
||||||
|
<label class="form-check-label" for="portfolio-2-5">2-5 products/services</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="ProductPortfolio"
|
||||||
|
id="portfolio-more-than-5" value="more-than-5">
|
||||||
|
<label class="form-check-label" for="portfolio-more-than-5">More than 5
|
||||||
|
products/services</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Indicates the variety of systems requiring
|
||||||
|
protection.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Supplier Base Structure -->
|
||||||
|
<div class="mb-3 question" id="q17">
|
||||||
|
<label class="form-label mt-3">What is your supplier base structure?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="SupplierBase"
|
||||||
|
id="supplier-single-critical" value="single-critical" required>
|
||||||
|
<label class="form-check-label" for="supplier-single-critical">Single/few critical
|
||||||
|
suppliers</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="SupplierBase" id="supplier-moderate"
|
||||||
|
value="moderate">
|
||||||
|
<label class="form-check-label" for="supplier-moderate">Moderate supplier base</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="SupplierBase"
|
||||||
|
id="supplier-highly-diverse" value="highly-diverse">
|
||||||
|
<label class="form-check-label" for="supplier-highly-diverse">Highly diverse supplier
|
||||||
|
base</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Assesses third-party cybersecurity risks.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- IT Infrastructure Model -->
|
||||||
|
<div class="mb-3 question" id="q18">
|
||||||
|
<label class="form-label mt-3">What is your primary IT infrastructure model?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-on-prem"
|
||||||
|
value="on-premises">
|
||||||
|
<label class="form-check-label" for="it-on-prem">On-premises systems</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-cloud"
|
||||||
|
value="cloud-based">
|
||||||
|
<label class="form-check-label" for="it-cloud">Cloud-based systems</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-hybrid"
|
||||||
|
value="hybrid">
|
||||||
|
<label class="form-check-label" for="it-hybrid">Hybrid infrastructure</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-legacy"
|
||||||
|
value="legacy">
|
||||||
|
<label class="form-check-label" for="it-legacy">Legacy systems</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="ITInfrastructure" id="it-modern"
|
||||||
|
value="modern">
|
||||||
|
<label class="form-check-label" for="it-modern">Modern architecture</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Determines specific cybersecurity controls.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Intellectual Property Protection -->
|
||||||
|
<div class="mb-3 question" id="q19">
|
||||||
|
<label class="form-label mt-3">How does your organization protect and manage intellectual
|
||||||
|
property?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-patents"
|
||||||
|
value="patents">
|
||||||
|
<label class="form-check-label" for="ip-patents">Patents owned</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-licensed"
|
||||||
|
value="licensed-ip">
|
||||||
|
<label class="form-check-label" for="ip-licensed">Licensed IP from others</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-trade-secrets"
|
||||||
|
value="trade-secrets">
|
||||||
|
<label class="form-check-label" for="ip-trade-secrets">Trade secrets</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-joint"
|
||||||
|
value="joint-ip">
|
||||||
|
<label class="form-check-label" for="ip-joint">Joint IP ownership</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="IPProtection" id="ip-none"
|
||||||
|
value="no-ip">
|
||||||
|
<label class="form-check-label" for="ip-none">No significant IP</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Evaluates cybersecurity needs based on IP
|
||||||
|
ownership.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sensitive Data -->
|
||||||
|
<div class="mb-3 question" id="q20">
|
||||||
|
<label class="form-label mt-3">What type of sensitive data does your organization handle?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-personal"
|
||||||
|
value="personal">
|
||||||
|
<label class="form-check-label" for="data-personal">Personal customer data</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-financial"
|
||||||
|
value="financial">
|
||||||
|
<label class="form-check-label" for="data-financial">Financial records</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-healthcare"
|
||||||
|
value="healthcare">
|
||||||
|
<label class="form-check-label" for="data-healthcare">Healthcare information</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-ip"
|
||||||
|
value="ip">
|
||||||
|
<label class="form-check-label" for="data-ip">Intellectual property</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-gov"
|
||||||
|
value="government">
|
||||||
|
<label class="form-check-label" for="data-gov">Government data</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="SensitiveData" id="data-payment"
|
||||||
|
value="payment">
|
||||||
|
<label class="form-check-label" for="data-payment">Payment card data</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Identifies required compliance frameworks.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Critical Business Systems -->
|
||||||
|
<div class="mb-3 question" id="q21">
|
||||||
|
<label class="form-label mt-3">How integrated are your critical business systems?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="IntegrationLevel"
|
||||||
|
id="integration-fully-integrated" value="fully-integrated" required>
|
||||||
|
<label class="form-check-label" for="integration-fully-integrated">Fully integrated</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="IntegrationLevel"
|
||||||
|
id="integration-partially-integrated" value="partially-integrated">
|
||||||
|
<label class="form-check-label" for="integration-partially-integrated">Partially
|
||||||
|
integrated</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="IntegrationLevel"
|
||||||
|
id="integration-mostly-separate" value="mostly-separate">
|
||||||
|
<label class="form-check-label" for="integration-mostly-separate">Mostly separate</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="IntegrationLevel"
|
||||||
|
id="integration-completely-isolated" value="completely-isolated">
|
||||||
|
<label class="form-check-label" for="integration-completely-isolated">Completely
|
||||||
|
isolated</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Evaluates potential for cascade failures.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Remote Work Policy -->
|
||||||
|
<div class="mb-3 question" id="q22">
|
||||||
|
<label class="form-label mt-3">What is your organization's remote work policy?</label>
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="RemotePolicy" id="remote-no-remote"
|
||||||
|
value="no-remote" required>
|
||||||
|
<label class="form-check-label" for="remote-no-remote">No remote work allowed</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="RemotePolicy" id="remote-limited-remote"
|
||||||
|
value="limited-remote">
|
||||||
|
<label class="form-check-label" for="remote-limited-remote">Limited remote work
|
||||||
|
options</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="RemotePolicy" id="remote-hybrid"
|
||||||
|
value="hybrid">
|
||||||
|
<label class="form-check-label" for="remote-hybrid">Hybrid work model</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="radio" name="RemotePolicy" id="remote-fully-remote"
|
||||||
|
value="fully-remote">
|
||||||
|
<label class="form-check-label" for="remote-fully-remote">Fully remote operations
|
||||||
|
available</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted py-3">Determines the scope of remote access security
|
||||||
|
requirements.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-end mt-4">
|
||||||
|
<button type="button" class="btn btn-lg btn-outline-secondary me-3" id="back">Back</button>
|
||||||
|
<button type="submit" class="btn btn-primary btn-lg" id="submit">Next</button>
|
||||||
|
<button type="button" class="btn btn-primary btn-lg" id="next">Next</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -178,5 +704,5 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "bottom"}}
|
{{define "bottom"}}
|
||||||
<script src="/static/js/signup.js"></script>
|
<script src="/static/js/formHandling.js"></script>
|
||||||
{{end}}
|
{{end}}
|
||||||
43
db/advancedProfile.go
Normal file
43
db/advancedProfile.go
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package db
|
||||||
|
|
||||||
|
type AdvancedProfile struct {
|
||||||
|
CompanyId int
|
||||||
|
GeographicDistribution string
|
||||||
|
CustomerConcentration string
|
||||||
|
ProductServicePortfolio string
|
||||||
|
OrganizationalCulture string
|
||||||
|
SupplierDiversity string
|
||||||
|
TechnologicalInfrastructure string
|
||||||
|
IntellectualProperty string
|
||||||
|
ManagementTeamExperience string
|
||||||
|
}
|
||||||
|
|
||||||
|
// InsertAdvancedProfile inserts a new record into the AdvancedProfile table
|
||||||
|
func InsertAdvancedProfile(profile AdvancedProfile) (int, error) {
|
||||||
|
query := `
|
||||||
|
INSERT INTO AdvancedProfile (
|
||||||
|
CompanyId, GeographicDistribution, CustomerConcentration, ProductServicePortfolio, OrganizationalCulture,
|
||||||
|
SupplierDiversity, TechnologicalInfrastructure, IntellectualProperty, ManagementTeamExperience
|
||||||
|
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||||
|
RETURNING id
|
||||||
|
`
|
||||||
|
|
||||||
|
stmt, err := db.Prepare(query)
|
||||||
|
if err != nil {
|
||||||
|
return -2, err
|
||||||
|
}
|
||||||
|
defer stmt.Close()
|
||||||
|
|
||||||
|
id := 0
|
||||||
|
err = stmt.QueryRow(
|
||||||
|
profile.CompanyId, profile.GeographicDistribution, profile.CustomerConcentration, profile.ProductServicePortfolio,
|
||||||
|
profile.OrganizationalCulture, profile.SupplierDiversity, profile.TechnologicalInfrastructure, profile.IntellectualProperty,
|
||||||
|
profile.ManagementTeamExperience,
|
||||||
|
).Scan(&id)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return -1, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return id, nil
|
||||||
|
}
|
||||||
@@ -1,24 +1,36 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
type BasicProfile struct {
|
type BasicProfile struct {
|
||||||
CompanyId int
|
CompanyId int // Company ID (foreign key reference)
|
||||||
Employees string
|
Employees string // Current employee headcount
|
||||||
Revenue string
|
Revenue string // Annual revenue range
|
||||||
Applications string
|
Applications string // Critical business applications
|
||||||
Compliance string
|
Compliance string // Regulatory frameworks
|
||||||
Industry string
|
Industry string // Primary industry sector
|
||||||
ITDependency string
|
ITDependency string // Technology dependency
|
||||||
DataSensitivity string
|
DataSensitivity string // Sensitive data level
|
||||||
DataVolume string
|
DataVolume string // Data volume (if applicable)
|
||||||
NetworkSegmentation string
|
NetworkSegmentation string // Network infrastructure model
|
||||||
LegacySystems string
|
LegacySystems string // Legacy systems (if applicable)
|
||||||
IoTIntegration string
|
IoTIntegration string // IoT integration (if applicable)
|
||||||
RemoteWork string
|
RemoteWork string // Remote work details
|
||||||
BYOD string
|
BYOD string // Bring Your Own Device policy
|
||||||
VPN string
|
VPN string // VPN usage policy
|
||||||
API string
|
API string // API integration (if applicable)
|
||||||
VendorAccess string
|
VendorAccess string // Third-party vendor access
|
||||||
InternalDev string
|
InternalDev string // Internal software development activities
|
||||||
|
|
||||||
|
// New fields from the advanced form
|
||||||
|
GeoScope string // Geographic operational scope
|
||||||
|
CustomerBase string // Customer base distribution
|
||||||
|
CustomerType string // Primary customer type
|
||||||
|
ProductPortfolio string // Product/service portfolio
|
||||||
|
SupplierBase string // Supplier base structure
|
||||||
|
ITInfrastructure string // IT infrastructure model (comma-separated values)
|
||||||
|
IPProtection string // Intellectual property protection (comma-separated values)
|
||||||
|
SensitiveData string // Sensitive data types (comma-separated values)
|
||||||
|
IntegrationLevel string // Integration level of business systems
|
||||||
|
RemotePolicy string // Remote work policy
|
||||||
}
|
}
|
||||||
|
|
||||||
// InsertBasicProfile inserts a new record into the BasicProfile table
|
// InsertBasicProfile inserts a new record into the BasicProfile table
|
||||||
|
|||||||
53
db/db.go
53
db/db.go
@@ -26,7 +26,8 @@ func InitDB() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func createTables() {
|
func createTables() {
|
||||||
companyTable := `
|
tables := []string{
|
||||||
|
`
|
||||||
CREATE TABLE IF NOT EXISTS Company (
|
CREATE TABLE IF NOT EXISTS Company (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
UUID TEXT NOT NULL,
|
UUID TEXT NOT NULL,
|
||||||
@@ -34,9 +35,9 @@ func createTables() {
|
|||||||
TaxId TEXT NOT NULL,
|
TaxId TEXT NOT NULL,
|
||||||
Email TEXT NOT NULL,
|
Email TEXT NOT NULL,
|
||||||
Password TEXT NOT NULL
|
Password TEXT NOT NULL
|
||||||
);`
|
);`,
|
||||||
|
|
||||||
basicProfileTable := `
|
`
|
||||||
CREATE TABLE IF NOT EXISTS BasicProfile (
|
CREATE TABLE IF NOT EXISTS BasicProfile (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
CompanyId INTEGER,
|
CompanyId INTEGER,
|
||||||
@@ -57,37 +58,33 @@ func createTables() {
|
|||||||
API TEXT,
|
API TEXT,
|
||||||
VendorAccess TEXT,
|
VendorAccess TEXT,
|
||||||
InternalDev TEXT,
|
InternalDev TEXT,
|
||||||
|
GeoScope TEXT, -- Geographic operational scope
|
||||||
|
CustomerBase TEXT, -- Customer base distribution
|
||||||
|
CustomerType TEXT, -- Primary customer type
|
||||||
|
ProductPortfolio TEXT, -- Product/service portfolio
|
||||||
|
SupplierBase TEXT, -- Supplier base structure
|
||||||
|
ITInfrastructure TEXT, -- IT infrastructure model (comma-separated values)
|
||||||
|
IPProtection TEXT, -- Intellectual property protection (comma-separated values)
|
||||||
|
SensitiveData TEXT, -- Sensitive data types (comma-separated values)
|
||||||
|
IntegrationLevel TEXT, -- Integration level of business systems
|
||||||
|
RemotePolicy TEXT, -- Remote work policy
|
||||||
FOREIGN KEY (CompanyId) REFERENCES Company(id)
|
FOREIGN KEY (CompanyId) REFERENCES Company(id)
|
||||||
);`
|
);`,
|
||||||
|
|
||||||
advancedProfileTable := `
|
`CREATE TABLE IF NOT EXISTS Session (
|
||||||
CREATE TABLE IF NOT EXISTS AdvancedProfile (
|
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
CompanyId INTEGER,
|
key TEXT NOT NULL,
|
||||||
GeographicDistribution TEXT,
|
value TEXT NOT NULL
|
||||||
CustomerConcentration TEXT,
|
);`,
|
||||||
ProductServicePortfolio TEXT,
|
|
||||||
OrganizationalCulture TEXT,
|
|
||||||
SupplierDiversity TEXT,
|
|
||||||
TechnologicalInfrastructure TEXT,
|
|
||||||
IntellectualProperty TEXT,
|
|
||||||
ManagementTeamExperience TEXT,
|
|
||||||
FOREIGN KEY (CompanyId) REFERENCES Company(id)
|
|
||||||
);`
|
|
||||||
|
|
||||||
_, err := db.Exec(companyTable)
|
`CREATE INDEX IF NOT EXISTS idx_session_key ON Session(key);`,
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("Error creating Company table: %v", err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = db.Exec(basicProfileTable)
|
for _, table := range tables {
|
||||||
if err != nil {
|
_, err := db.Exec(table)
|
||||||
log.Fatalf("Error creating BasicProfile table: %v", err)
|
if err != nil {
|
||||||
}
|
log.Fatalf("Error creating table: %v", err)
|
||||||
|
}
|
||||||
_, err = db.Exec(advancedProfileTable)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("Error creating AdvancedProfile table: %v", err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
15
db/utils.go
15
db/utils.go
@@ -1,16 +1,23 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math/rand"
|
"crypto/rand"
|
||||||
|
"log"
|
||||||
|
"math/big"
|
||||||
)
|
)
|
||||||
|
|
||||||
var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890")
|
||||||
|
|
||||||
func GenerateRandomString() string {
|
func GenerateRandomString() string {
|
||||||
const n = 25
|
const n = 38
|
||||||
b := make([]rune, n)
|
b := make([]rune, n)
|
||||||
for i := range b {
|
for i := range b {
|
||||||
b[i] = letters[rand.Intn(len(letters))]
|
num, err := rand.Int(rand.Reader, big.NewInt(int64(len(letters))))
|
||||||
|
if err != nil {
|
||||||
|
log.Println("Error generating random string: ", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
b[i] = letters[num.Int64()]
|
||||||
}
|
}
|
||||||
return string(b)
|
return string(b)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user