-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
99 changed files
with
5,411 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Created by https://www.gitignore.io/api/eclipse,java,maven | ||
|
||
### Eclipse ### | ||
*.pydevproject | ||
.metadata | ||
.gradle | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.settings/ | ||
.loadpath | ||
|
||
# Eclipse Core | ||
.project | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# CDT-specific | ||
.cproject | ||
|
||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
|
||
# Java annotation processor (APT) | ||
.factorypath | ||
|
||
# PDT-specific | ||
.buildpath | ||
|
||
# sbteclipse plugin | ||
.target | ||
|
||
# TeXlipse plugin | ||
.texlipse | ||
|
||
|
||
### Java ### | ||
*.class | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
|
||
### Maven ### | ||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
|
||
### Vault ### | ||
.vlt | ||
|
||
### IntelliJ ### | ||
.idea/ | ||
*.iml | ||
|
||
.DS_Store | ||
/TODO.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
language: java | ||
jdk: | ||
- openjdk9 | ||
addons: | ||
sonarcloud: | ||
organization: valtech-avs | ||
token: | ||
secure: gPXlvZfPVk1JC+swRzh4hDNRMeYPCmPhxOVjmKrizTOnK0T3TOIAY2reUH0+U61fAAfobC4sO5gPsx0cy/diN+b2Ln/mOIY4T4S7be7jlXXuySTYwZSeI9IIOs+T3/OPko850GBU7IYrSFOyzae3OXs3j5R+nzg6stW1PXV3WceF+rZ2aSJbmcMIv17GHSDtxyYQkc/R9WW8OH2DOMng5LzJ3b4qv20Xzamt1povDX69YX+DXuGYErjBzcivwu33yNDxjX0a8AT51cLl6l31AZM7Z0TsAKMn3tPNObwKSGVwDjTfhgTUyH57MFF389om1BgxnZERiiTwYXYuVhm4rdSl8usw351LUO7VGtUCA/exh74R8R7uro+buoGmeOBKLp/NtOpvvVg4/c7YUi4KjuGdVua7b5XgoRsbAjFzHR2TeFw5eH5AzpTS6j1ryM8p+Os29fBJ72lVD35iFMZ8Vut5Fiz3chVitI25/94leU5+qWq1Rfh9s+4jJL/HldlGgXjII0lCFDa8up9ezbOn/j+9zo9vl4WiJgl9fSZ2KAQuFAhGkGWIda8ctjqwZmOwX2vF0F3eAZjWT+jNbyuZhmnR/K156fnEQHpTHVZkpgnJgK0Hc6P2XISbl5ZRxMTtJCbnZhCFnXp7xYcIfbWkokHzmLPGi6i3lXWtJfiVmF8= | ||
script: | ||
- mvn test javadoc:javadoc -B | ||
- sonar-scanner | ||
cache: | ||
directories: | ||
- "$HOME/.sonar/cache" | ||
- "$HOME/.m2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
2020 1.0.0 | ||
- initial release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,192 @@ | ||
# -aem-virus-check | ||
AEM Virus Check adds malware scanning to your AEM instance. | ||
# AEM Virus Scan | ||
|
||
AEM Virus Scan adds malware scanning to your AEM instance. It supports Clam AV out-of-the-box and can be extended to support more scan engines. | ||
|
||
Features: | ||
|
||
* Scanning of asset uploads | ||
* API to run scan from custom code | ||
* API to add custom scan engines | ||
* Provided scan engines: | ||
* Clam AV | ||
* Health checks | ||
|
||
<a name="requirements"></a> | ||
|
||
# Requirements | ||
|
||
AVS requires Java 8 and AEM 6.4 or above. | ||
|
||
| AEM Version | AVS | | ||
| ------------- | --------- | | ||
| 6.4 | 1.x | | ||
| 6.5 | 1.x | | ||
|
||
<a name="installation"></a> | ||
|
||
# Installation | ||
|
||
You can download the package from [Maven Central](http://repo1.maven.org/maven2/de/valtech/avs/avs.ui.apps/) or our [releases section](https://github.com/valtech/aem-virus-scan/releases). The avs.ui.apps package will install the AVS software. | ||
|
||
```xml | ||
<dependency> | ||
<groupId>de.valtech.avs</groupId> | ||
<artifactId>avs.ui.apps</artifactId> | ||
<version>LATEST</version> | ||
<type>zip</type> | ||
</dependency> | ||
``` | ||
|
||
|
||
## Uninstallation | ||
|
||
The application can be removed by deleting the following paths: | ||
* /apps/valtech/avs | ||
* /var/avs | ||
|
||
Afterwards, you can delete the "avs.ui.apps" package in package manager. | ||
|
||
# Scan File Uploads | ||
|
||
You can scan files in any POST request. E.g. this way you can scan files that are uploaded to DAM. | ||
|
||
You should provide a [configuration](#conf_filter) of the URL patterns for the filter. | ||
|
||
# Tools | ||
|
||
AVS adds tools to the AEM menu. | ||
|
||
<img src="docs/images/tools.png"> | ||
|
||
|
||
## Perform a Manual Scan | ||
|
||
You can upload a file using AVS scan tool from the menu. This allows you to check if there is an issue with the file. | ||
|
||
<img src="docs/images/manualScan.png"> | ||
|
||
|
||
## History | ||
|
||
This shows the history of the last found infections. Scans that did not lead to an alert are not listed. | ||
|
||
<img src="docs/images/history.png"> | ||
|
||
# Configuration | ||
|
||
You can see an example for each configuration in [example package](/examples/src/main/content/jcr_root/apps/valtech/avs-examples/config). | ||
|
||
<a name="conf_filter"></a> | ||
|
||
## AVS Post Filter | ||
|
||
This filter can scan e.g. asset uploads for viruses. | ||
|
||
* includePatterns: List of regular expressions to match the URLs to check. If empty, all non-excluded URLs are scanned. | ||
* excludePatterns: List of regular expressions to match the URLs to ignore. Has higher priority than include patterns. | ||
|
||
PID: de.valtech.avs.core.filter.AvsPostFilter | ||
|
||
File name: de.valtech.avs.core.filter.AvsPostFilter.xml | ||
|
||
``` | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" | ||
includePatterns="[/content/dam/.*]" | ||
excludePatterns="[]" | ||
/> | ||
``` | ||
|
||
<a name="conf_mail"></a> | ||
|
||
## AVS Notification Mailer | ||
|
||
This filter can scan e.g. asset uploads for viruses. | ||
|
||
* subject: mail subject | ||
* body: body for all virus notification emails. Wildcards are ${FILE_NAME} for uploaded file name and ${SCAN_OUTPUT} for scan details. | ||
* isHtml: specifies if mail format is HTML or TEXT | ||
* from: FROM address for notification emails | ||
* additionalRecipients: additional email recipients | ||
|
||
PID: de.valtech.avs.core.mail.AvsNotificationMailer | ||
|
||
File name: de.valtech.avs.core.mail.AvsNotificationMailer.xml | ||
|
||
``` | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" | ||
subject="A virus was found" | ||
body="Dear Sir or Madam,<br><br>a virus was detected in your file upload.<br><br>File name: ${FILE_NAME}<br>Scan report: ${SCAN_OUTPUT}" | ||
isHtml="{Boolean}true" | ||
from="[email protected]" | ||
additionalRecipients="[root@localhost]" | ||
/> | ||
``` | ||
|
||
<a name="conf_clam"></a> | ||
|
||
## Clam Scanning Engine | ||
|
||
You need to provide a configuration for Clam AV in case you want to use this scan engine. If no configuration is provided then it will not be activated. | ||
|
||
* command: command to scan a single file. The file name will be added at the end of the command. | ||
|
||
PID: de.valtech.avs.core.service.scanner.ClamScannerEngine | ||
|
||
File name: de.valtech.avs.core.service.scanner.ClamScannerEngine.xml | ||
|
||
``` | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" | ||
command="/usr/local/bin/clamdscan --infected --no-summary" | ||
/> | ||
``` | ||
|
||
<a name="conf_history"></a> | ||
|
||
## Purge History | ||
|
||
This configures how long to keep the scan history. Older entries will be purged with maintenance task. | ||
|
||
PID: de.valtech.avs.core.maintenance.PurgeHistoryTask | ||
|
||
File name: de.valtech.avs.core.maintenance.PurgeHistoryTask.xml | ||
|
||
``` | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" | ||
daysToKeep="30" | ||
/> | ||
``` | ||
|
||
# Health Checks | ||
|
||
Health checks show you the status of AVS. This includes its service user, scan engines and a test scan. | ||
You can access them on the [status page](http://localhost:4502/libs/granite/operations/content/healthreports/healthreportlist.html/system/sling/monitoring/mbeans/org/apache/sling/healthcheck/HealthCheck/avsHealthCheckmBean). | ||
|
||
<img src="docs/images/healthcheck.png"> | ||
|
||
<a name="api"></a> | ||
|
||
# API Documentation | ||
|
||
TODO | ||
|
||
<a name="license"></a> | ||
|
||
# License | ||
|
||
The AVS tool is licensed under the [MIT LICENSE](LICENSE). | ||
|
||
<a name="changelog"></a> | ||
|
||
# Changelog | ||
|
||
Please see our [history file](HISTORY). | ||
|
||
<a name="developers"></a> | ||
|
||
# Developers | ||
|
||
See our [developer zone](docs/developers.md). |
Oops, something went wrong.