Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add origin_referrer_url, origin_url and zone_identifier to the file attribute #1430

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
968e8c2
add modified registry.yaml and generated files
AsuNa-jp Sep 24, 2024
ec834e6
add changelog
AsuNa-jp Sep 25, 2024
160b7ee
reflect the feedback
AsuNa-jp Sep 27, 2024
37c9710
reflect the feedback
AsuNa-jp Sep 27, 2024
4a2fed9
format fix
AsuNa-jp Sep 27, 2024
481bd1c
Merge branch 'main' into file_originevents
AsuNa-jp Sep 30, 2024
a2b4b35
Merge branch 'main' into file_originevents
AsuNa-jp Sep 30, 2024
4b11936
Merge branch 'main' into file_originevents
AsuNa-jp Oct 3, 2024
a1a4867
Merge branch 'main' into file_originevents
AsuNa-jp Oct 10, 2024
e8256e6
add file.zone_identifier
AsuNa-jp Oct 10, 2024
c55cb2b
Merge branch 'file_originevents' of github.com:AsuNa-jp/semantic-conv…
AsuNa-jp Oct 10, 2024
130bf61
re-generated the docs
AsuNa-jp Oct 25, 2024
1f6663a
Merge branch 'main' into file_originevents
AsuNa-jp Oct 28, 2024
329df10
Merge branch 'main' into file_originevents
trisch-me Oct 29, 2024
ba508e4
Merge branch 'main' into file_originevents
AsuNa-jp Oct 30, 2024
f4ad750
Merge branch 'main' into file_originevents
AsuNa-jp Oct 30, 2024
d82f261
add note of zoneID
AsuNa-jp Oct 30, 2024
c6b8d78
Merge branch 'file_originevents' of github.com:AsuNa-jp/semantic-conv…
AsuNa-jp Oct 30, 2024
b0016f6
Merge branch 'main' into file_originevents
AsuNa-jp Oct 31, 2024
7d5331c
Merge branch 'open-telemetry:main' into file_originevents
AsuNa-jp Oct 31, 2024
ed796cc
fixed the typo
AsuNa-jp Oct 31, 2024
f4e241c
Merge branch 'main' into file_originevents
AsuNa-jp Nov 1, 2024
264fd13
Merge branch 'main' into file_originevents
AsuNa-jp Nov 1, 2024
b590595
Merge branch 'main' into file_originevents
AsuNa-jp Nov 7, 2024
0793ef9
Merge branch 'main' into file_originevents
AsuNa-jp Nov 8, 2024
17107e4
Merge branch 'main' into file_originevents
AsuNa-jp Nov 11, 2024
a3dfd75
Merge branch 'main' into file_originevents
AsuNa-jp Nov 11, 2024
daa081e
Merge branch 'main' into file_originevents
AsuNa-jp Nov 13, 2024
22d06ab
Merge branch 'main' into file_originevents
AsuNa-jp Nov 18, 2024
088e959
resolve merge conflicts
AsuNa-jp Nov 19, 2024
358f21a
Merge branch 'main' into file_originevents
AsuNa-jp Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/file_originevents.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: file

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: add file.origin_referrer_url and file.origin_url

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1430]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
57 changes: 35 additions & 22 deletions docs/attributes-registry/file.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@




<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# File

## File Attributes

Describes file attributes.

| Attribute | Type | Description | Examples | Stability |
| -------------------------------- | -------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------- |
| `file.accessed` | string | Time when the file was last accessed, in ISO 8601 format. [1] | `2021-01-01T12:00:00Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.attributes` | string[] | Array of file attributes. [2] | `["readonly", "hidden"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.changed` | string | Time when the file attributes or metadata was last changed, in ISO 8601 format. [3] | `2021-01-01T12:00:00Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.created` | string | Time when the file was created, in ISO 8601 format. [4] | `2021-01-01T12:00:00Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.directory` | string | Directory where the file is located. It should include the drive letter, when appropriate. | `/home/user`; `C:\Program Files\MyApp` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.extension` | string | File extension, excluding the leading dot. [5] | `png`; `gz` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.fork_name` | string | Name of the fork. A fork is additional data associated with a filesystem object. [6] | `Zone.Identifer` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.group.id` | string | Primary Group ID (GID) of the file. | `1000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.group.name` | string | Primary group name of the file. | `users` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.inode` | string | Inode representing the file in the filesystem. | `256383` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.mode` | string | Mode of the file in octal representation. | `0640` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.modified` | string | Time when the file content was last modified, in ISO 8601 format. | `2021-01-01T12:00:00Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.name` | string | Name of the file including the extension, without the directory. | `example.png` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.owner.id` | string | The user ID (UID) or security identifier (SID) of the file owner. | `1000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.owner.name` | string | Username of the file owner. | `root` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.path` | string | Full path to the file, including the file name. It should include the drive letter, when appropriate. | `/home/alice/example.png`; `C:\Program Files\MyApp\myapp.exe` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.size` | int | File size in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.symbolic_link.target_path` | string | Path to the target of a symbolic link. [7] | `/usr/bin/python3` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `file.accessed` | string | Time when the file was last accessed, in ISO 8601 format. [1] | `2021-01-01T12:00:00Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.attributes` | string[] | Array of file attributes. [2] | `["readonly", "hidden"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.changed` | string | Time when the file attributes or metadata was last changed, in ISO 8601 format. [3] | `2021-01-01T12:00:00Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.created` | string | Time when the file was created, in ISO 8601 format. [4] | `2021-01-01T12:00:00Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.directory` | string | Directory where the file is located. It should include the drive letter, when appropriate. | `/home/user`; `C:\Program Files\MyApp` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.extension` | string | File extension, excluding the leading dot. [5] | `png`; `gz` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.fork_name` | string | Name of the fork. A fork is additional data associated with a filesystem object. [6] | `Zone.Identifer` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.group.id` | string | Primary Group ID (GID) of the file. | `1000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.group.name` | string | Primary group name of the file. | `users` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.inode` | string | Inode representing the file in the filesystem. | `256383` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.mode` | string | Mode of the file in octal representation. | `0640` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.modified` | string | Time when the file content was last modified, in ISO 8601 format. | `2021-01-01T12:00:00Z` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.name` | string | Name of the file including the extension, without the directory. | `example.png` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.origin_referrer_url` | string | The URL of the webpage that linked to the file. [7] | `https://example.com` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.origin_url` | string | The URL where the file is hosted. [8] | `https://example.com/file.zip` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.owner.id` | string | The user ID (UID) or security identifier (SID) of the file owner. | `1000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.owner.name` | string | Username of the file owner. | `root` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.path` | string | Full path to the file, including the file name. It should include the drive letter, when appropriate. | `/home/alice/example.png`; `C:\Program Files\MyApp\myapp.exe` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.size` | int | File size in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.symbolic_link.target_path` | string | Path to the target of a symbolic link. [9] | `/usr/bin/python3` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |


**[1]:** This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.

Expand All @@ -44,4 +50,11 @@ Describes file attributes.
**[6]:** On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist.
On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: C:\path\to\filename.extension:some_fork_name, and some_fork_name is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name.

**[7]:** This attribute is only applicable to symbolic links.
**[7]:** This information is inteded to be retrieved from the Mark of the Web (NTFS Zone.Identifer ADS Stream) Note that the URL might contain sensitive information.

**[8]:** This information is inteded to be retrieved from the Mark of the Web (NTFS Zone.Identifer ADS Stream) Note that the URL might contain sensitive information.

**[9]:** This attribute is only applicable to symbolic links.



16 changes: 16 additions & 0 deletions model/file/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@ groups:
The user ID (UID) or security identifier (SID) of the file owner.
stability: experimental
examples: ["1000"]
- id: file.origin_referrer_url
type: string
brief: >
The URL of the webpage that linked to the file.
note: >
This information is inteded to be retrieved from the Mark of the Web (NTFS Zone.Identifer ADS Stream) Note that the URL might contain sensitive information.
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
stability: experimental
examples: ['https://example.com']
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
- id: file.origin_url
type: string
brief: >
The URL where the file is hosted.
note: >
This information is inteded to be retrieved from the Mark of the Web (NTFS Zone.Identifer ADS Stream) Note that the URL might contain sensitive information.
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
stability: experimental
examples: ['https://example.com/file.zip']
- id: file.owner.name
type: string
brief: >
Expand Down
Loading