Skip to content

feat: allow provenance files to be files containing a URL pointing to… #710

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

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

nicallen
Copy link
Member

… the actual provenance file which will be transparently downloaded

URL link file format is the Windows .url file format i.e. an ini file containing a "URL" field inside an "InternetShortcut" section. When processing the URL link provenance file, the content will be transparently downloaded if the hostname of the URL is configured as an allowed hostname in the defaults.ini file.

… the actual provenance file which will be transparently downloaded

URL link file format is the Windows .url file format i.e. an ini file containing a "URL" field inside an "InternetShortcut" section.
When processing the URL link provenance file, the content will be transparently downloaded if the hostname of the URL is configured as an allowed hostname in the defaults.ini file.

Signed-off-by: Nicholas Allen <[email protected]>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 18, 2024
try:
# TODO download size limit?
timeout = defaults.getint("downloads", "timeout", fallback=120)
response = requests.get(url=url, timeout=timeout)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the send_get_http_raw helper function so that we can improve the implementation in one place as explained in this issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

…l file content, and simplify file-content decoding

Signed-off-by: Nicholas Allen <[email protected]>
Copy link
Member

@nathanwn nathanwn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Copy link
Member

@tromai tromai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes. I have left some comments. Other than those, everything else looks good to me.

Copy link
Member

@tromai tromai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@nicallen nicallen merged commit 4a8cbaa into staging Apr 19, 2024
@nathanwn nathanwn deleted the nicallen/provenance-url-link-file branch April 22, 2024 04:42
art1f1c3R pushed a commit that referenced this pull request Nov 29, 2024
… the actual provenance file which will be transparently downloaded (#710)

URL link file format is the Windows .url file format i.e. an ini file containing a "URL" field inside an "InternetShortcut" section. When processing the URL link provenance file, the content will be transparently downloaded if the hostname of the URL is configured as an allowed hostname in the defaults.ini file.

Signed-off-by: Nicholas Allen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants