Skip to content

Commit

Permalink
Deploy to github pages
Browse files Browse the repository at this point in the history
In addition to a github action, this commit comes with a few UI
improvements and updates to the README.
  • Loading branch information
hkjels committed Jul 5, 2024
1 parent 034194b commit 1be5eb6
Show file tree
Hide file tree
Showing 23 changed files with 8,806 additions and 379 deletions.
3 changes: 2 additions & 1 deletion .clj-kondo/config.edn
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{:linters
{:unresolved-symbol {:exclude [(asva.utils/e>)
{:clojure-lsp/unused-public-var {:exclude [slurp]}
:unresolved-symbol {:exclude [(asva.utils/e>)
(asva.utils/dispatch>e)]}}}
9 changes: 9 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")

((nil . ((azure-team . "STC Support")
(azure-project . "Open Simulation Platform")
(azure-organization . "GTR-DigitalAssurance")
(cider-default-cljs-repl . shadow)
(cider-preferred-build-tool . shadow-cljs)
(cider-shadow-default-options . ":app"))))
66 changes: 66 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: ASVA

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write

defaults:
run:
working-directory: ${{ github.workspace }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Setup Clojure
uses: DeLaGuardo/[email protected]
with:
cli: 1.10.1.693
clj-kondo: 2022.05.31

- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install

- name: Build with shadow-cljs
run: npx shadow-cljs release app

- name: Remove everything but the final artifact
shell: bash
run: |
sudo mv resources/public/* .
find . -type f ! \( -path './index.html' -o -path './css/*' -o -path './fonts/*' -o -path './js/*' -o -path './.git/*' \) -delete
- name: Publish to Github pages
shell: bash
run: |
git config --global user.name documentation-action
git config --global user.email [email protected]
git add -A && git commit -m "ASVA"
git push origin HEAD:refs/heads/gh-pages --force
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
node_modules
cljs-runtime

package.json
package-lock.json
main.js
manifest.edn
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 [DNV](https://www.dnv.com) [open source](https://github.com/dnv-opensource)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 23 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# ASVA

This web application offers a sophisticated interface for interacting with ASVS
JSON files, a format developed by OWASP for documenting the security aspects of
a system. It not only displays these files as a comprehensive checklist
detailing essential security measures and protocols but also enables users to
add personalized notes to each item. This interactivity enhances the management
and documentation of security measures, facilitating a deeper understanding and
more effective tracking of system security data.
ASVA offers an interface for interacting with ASVS JSON files, a
format developed by OWASP for documenting the security aspects of a
system.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Live Demo](https://img.shields.io/badge/demo-online-green.svg)](https://dnv-opensource.github.io/asva/)

## Requirements

To set up and run this project, you will need:
To set up and run this project locally, you'll need:

- **Clojure**: The project is built with Clojure and ClojureScript. [Install Clojure](https://clojure.org/guides/getting_started) on your system.
- **Node.js and npm**: Required for managing JavaScript dependencies and executing compiled ClojureScript. [Download Node.js](https://nodejs.org/).
- **Shadow-cljs**: Used for ClojureScript compilation. Install it via npm: `npm install -g shadow-cljs`.

## Installation

```sh
git clone https://github.com/dnv-opensource/ASVA
cd ASVA
git clone https://github.com/dnv-opensource/asva
cd asva
npm install
```

## Usage
Expand All @@ -34,8 +33,16 @@ clojure -M:dev
Follow the on-screen instructions to access and interact with the application,
typically running on http://localhost:8080/.

On the initial page, you will be prompted to select a JSON file. Supported files
are available at https://github.com/OWASP/ASVS/tree/v4.0.3/4.0/ in multiple
languages, both a detailed version and a flat version. The key difference is
that the detailed version includes an introduction, which can provide additional
context and insights.
On the initial page, you will be prompted to select a JSON file from
the available options, which can be found in multiple languages at
[this GitHub repository](https://github.com/OWASP/ASVS/tree/v4.0.3/4.0). You can choose between a detailed version,
which includes an introductory section that offers additional context
and may be customized for your project, and a flat version. Once
selected, you will access the main application interface. Here, you
can either import an existing ASVA.json file, if you have one, or make
adjustments and export a new ASVA.json file. All data is securely
stored in your browser's local storage.

## License

This project is licensed under the MIT License - see the [LICENSE.md](./LICENSE.md) file for details.
2 changes: 2 additions & 0 deletions bb.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{:paths ["./"]
:deps {}}
5 changes: 3 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{:deps {reagent/reagent {:mvn/version "1.2.0"}
{:deps {org.clojure/clojure {:mvn/version "1.9.0"}
reagent/reagent {:mvn/version "1.2.0"}
re-frame/re-frame {:mvn/version "1.4.0"}
tongue/tongue {:mvn/version "0.4.4"}
cljs-bean/cljs-bean {:mvn/version "1.9.0"}
instaparse/instaparse {:mvn/version "1.4.12"}}
:paths ["src" "resources"]
:aliases
{:dev
{:extra-deps {thheller/shadow-cljs {:mvn/version "2.26.2"}
{:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.10"}
org.clojure/test.check {:mvn/version "1.1.0"}
day8.re-frame/tracing {:mvn/version "0.6.2"}
day8.re-frame/re-frame-10x {:mvn/version "1.9.1"}}
Expand Down
Loading

0 comments on commit 1be5eb6

Please sign in to comment.