Skip to content

Commit

Permalink
Resolving merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantxu1 committed Sep 17, 2024
2 parents 3a8346f + 5540575 commit 9fe42a9
Show file tree
Hide file tree
Showing 9 changed files with 825 additions and 831 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,26 @@ jobs:
timeout-minutes: 5
runs-on: ubuntu-latest
# needs: [ test-pre-commit ]
#
steps:
- uses: actions/checkout@v2

# - name: Setup docker-compose
# run: pip install docker-compose

- name: Build
run: |
docker compose build --pull --force-rm d3fend-ontology
docker-compose build --pull --force-rm d3fend-ontology
- name: Test Owl Load
run: docker compose run --rm d3fend-ontology make test-load-owl
run: docker-compose run --rm d3fend-ontology make test-load-owl
- name: Test TTL Load
run: docker compose run --rm d3fend-ontology make test-load-ttl
run: docker-compose run --rm d3fend-ontology make test-load-ttl
- name: Test JSON Load
run: docker compose run --rm d3fend-ontology make test-load-json
run: docker-compose run --rm d3fend-ontology make test-load-json
- name: Test Load Full
run: docker compose run --rm d3fend-ontology make test-load-full
run: docker-compose run --rm d3fend-ontology make test-load-full
- name: Test Jena
run: docker compose run --rm d3fend-ontology make test-jena
run: docker-compose run --rm d3fend-ontology make test-jena
- name: Test Reasoner
run: docker compose run --rm d3fend-ontology make test-reasoner
run: docker-compose run --rm d3fend-ontology make test-reasoner
- name: Cleanup
run: docker compose down && docker compose rm --force
run: docker-compose down && docker-compose rm --force

- uses: actions/upload-artifact@v3
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ data
node_modules
package*
src/ontology/mappings/catalog-v001.xml
.local
10 changes: 0 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# D3FEND Change Log

## Version - 0.16.0 - 2024-07-10
- Replace rdfs:seeAlso and rdfs:isDefinedBy anyURIs with standard IRIs. (#263)
- Removed hidden Reverse Resolution Domain Denylisting class. (#252)
- Direct Physical Link Mapping Technique added, deleted hidden Passive Physical Link Mapping class. (#251)
- Complete Certificate-based Authentication technique. (#250)
- Update to ATT&CK 15. (#239)
- Fix typo in definition of OSAPISystemFunction. (#235)
- GetRunningProcesses enumerates Process. (#231)
- Add "unloads" property. (#230)

## Version - 0.15.0 - 2024-04-26

- Fix d3fend-id on Reissue Credential. (#234)
Expand Down
14 changes: 2 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,10 @@ FROM rockylinux:9

ARG ROBOT_URL

COPY . /app
WORKDIR /app

# if any custom SSL certs exist in .local, install them
RUN if [ -n "$(find .local -name '*.pem' -o -name '*.crt' 2>/dev/null)" ]; then \
echo "Copying SSL certs from .local"; \
# if [ -e ] won't work here because of sh: Too Many Arguments
find /app/.local -name '*.crt' -exec cp {} /etc/pki/ca-trust/source/anchors \; 2>/dev/null || true; \
find /app/.local -name '*.pem' -exec cp {} /etc/pki/ca-trust/source/anchors \; 2>/dev/null || true; \
update-ca-trust extract; \
fi

RUN dnf -y install python39 java-17-openjdk-headless make python3-pip which git
VOLUME [ "/dist" ]
RUN pip3 install pipenv==2022.8.5
COPY . /app
WORKDIR /app
RUN make ROBOT_URL=${ROBOT_URL} clean install-deps
RUN make build extensions dist
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ MAKEFLAGS += --silent

SHELL=/bin/bash

D3FEND_VERSION :=0.16.0
D3FEND_RELEASE_DATE :="2024-07-10T00:00:00.000Z"
D3FEND_VERSION :=0.15.0
D3FEND_RELEASE_DATE :="2024-04-26T00:00:00.000Z"

ATTACK_VERSION := 15.0

Expand Down Expand Up @@ -338,7 +338,7 @@ build/extensions: build/d3fend-public.ttl build/cci-to-d3fend-mapping.ttl build/
build/ontology: builddir build/d3fend-full.owl build/d3fend-public.owl build/d3fend-public-mapped.owl build/d3fend-public-cco.owl reports/unallowed-thing-report.txt build/d3fend-architecture.owl build/d3fend-prefixes.json build/extensions ## run build and move to public folder, used to create output files, including JSON-LD, since robot doesn't support serializing to JSON-LD
$(END)

build: build/ontology build/d3fend.csv # build the D3FEND Ontology and Extensions
build: build/ontology # build the D3FEND Ontology and Extensions
pipenv run python3 src/util/build.py extensions # expects a build/d3fend-public-with-controls.owl file
$(END)

Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pylint = "*"
ipdb = "*"

[packages]
rdflib = "*"
rdflib = "6.0.2"
ttlser = {extras = ["ttlfmt"], version = "*"}
numpy = "*"
pandas = "*"
Expand Down
866 changes: 476 additions & 390 deletions Pipfile.lock

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ in the dist/ folder running
docker-compose up d3fend-ontology
```

### SSL Certificates in Docker

If you have custom SSL certificates needed to fetch packages and dependencies from the internet, make a directory `.local` in this project root and place your certificates in `.local/` as `.pem` or `.crt`. The docker build will install the certificates if it finds them there.


## NOTICE

Use of the MITRE D3FEND™ Knowledge Graph and website is subject to the Terms of Use. Use of the MITRE D3FEND website is subject to the MITRE D3FEND Privacy Policy. MITRE D3FEND is funded by the National Security Agency (NSA) Cybersecurity Directorate and managed by the National Security Engineering Center (NSEC), which is operated by The MITRE Corporation. MITRE D3FEND; and the MITRE D3FEND logo are trademarks of The MITRE Corporation. MITRE ATT&CK® and ATT&CK® are registered trademarks of The MITRE Corporation. MITRE ATT&CK content is subject to the MITRE ATT&CK terms of use.
Expand Down
Loading

0 comments on commit 9fe42a9

Please sign in to comment.