Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/cargo/anyhow-1.0.77
Browse files Browse the repository at this point in the history
  • Loading branch information
puhley authored Dec 31, 2023
2 parents 560d3e3 + 6677691 commit d436b7a
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 40 deletions.
129 changes: 92 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ repository = "https://github.com/contentauth/c2pa-attacks"

[dependencies]
anyhow = "1.0"
c2pa = { version = "0.28.3", features = ["fetch_remote_manifests", "file_io", "xmp_write"] }
c2pa = { version = "0.28.4", features = ["fetch_remote_manifests", "file_io", "xmp_write"] }
clap = { version = "4.4", features = ["derive"] }
env_logger = "0.10"
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serde_json = { version = "1.0" }
tempfile = "3.8"
tempfile = "3.9"
regex = "1.10.2"

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ These include:
* `image.jpg`: A base image without any C2PA content credentials
* `test.json`: A valid manifest to embed into the image
* `es256_certs.pem` and `es256_private.key`: A certificate and key that can be used to sign the images.
* `author_name_regex.json`: An example JSON file with the C2PA_ATTACK keyword in the author's name field. This can be used with a regex command line: `-t regex`. This is not the only way to inject into the author's name field. You could also do this by using test.json along with `-t author` in the command line. This file is just to demonstrate a regex-based approach on a common field. The value C2PA_ATTACK could be put into any of the JSON value field that needs testing.
* `author_name_regex.json`: An example JSON file with the C2PA_ATTACK keyword in the author's name field and id field. For unit testing, you would most likely want to only use field at a time. The use of two fields is just to demonstrate that it will replace all occurrences of the string with each pass. This can be used with a regex command line: `-t regex`. This is not the only way to inject into the author's name field. You could also do this by using test.json along with `-t author` in the command line. This file is just to demonstrate a regex-based approach on a common field. The value C2PA_ATTACK could be put into any of the JSON value field that needs testing.
1 change: 1 addition & 0 deletions sample/author_name_regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@type": "CreativeWork",
"author": [
{
"@id": "C2PA_ATTACK",
"@type": "Person",
"name": "C2PA_ATTACK"
}
Expand Down

0 comments on commit d436b7a

Please sign in to comment.